Room 1st which includes dimensions and treatments.
system synergy 2nd - from cables to matching amp to speakers.
3rd is speakers sized for the room. You don’t want small monitors in a 30’ room and you don’t want large Wilson’s in a 10x10’ room. I had large speakers in a dedicated room within a room 27’ long with 15’ ceilings. I moved to a smaller house and tried the same speakers in a 16’’ long room with 8’ ceilings, great speakers in a large room to terrible sounding in a much smaller room.
Right behind the speakers are the amps/dac/preamp all spec’d according to the value of the speakers. Your not going to spend $2000 on an amp if you have $100,000 speakers and you wouldn’t be spending $100,000 on an amp and dac if your speakers cost $3500.