I need help on pc build!! a beginner here

Aug 3, 2018
2
0
10
g5400
8gb ram DDR4
ASROCK 8TH GEN MOBO (h310m-hdv)
120GB SSD
GT1030
500w
windows 10 genuine
500gb hdd

is my specs, but if i want to upgrade to a i5-8400 & gtx 1060 isit compatible ? & if so how do i upgrade it to i5-8400 do i need to update anything whatsoever ? i’m very new to pc build & by searching thru youtube, i learn that to upgrade from gt 1030 to gtx 1060 all i need to do is change the part and update drivers on nvidia correct?