Depends if you have a workstand or not.
If you do then seatpost and clamp first.
Headset
Forks
Stem then cut steerer with a bit of extra length just incase
bars
shifters
brakes
bb and crank
mechs
wheels including cassette
chain
align brakes and setup gears
tyres grips saddle etc
If you dont have a workstand
Tyres and cassette on wheels
Headset
Forks
Stem and cut steerer to length as above
Bars so you can lean it against something
Wheels
Post and Saddle so you can lean it against something
Shifters and brakes
bb and crank
mechs and chain
align brakes and setup gears
grips
FWIW I dont have a workstand but wish I did.
Notes:
Get plenty of headset spacers so you can find the correct hight after shakedown rides
Get grease
A track pump is useful
Remove all the new stuff from boxes before you start
use the proper tools for the job headset press etc
HTH