I usually install CPU / HSF first, with the motherboard resting on an antistatic bag and being careful not to zap it with static electricity.
Some cases have a slide-out motherboard tray, for those you can install the motherboard to the tray first, then the CPU / HSF, then put the tray back in the case.
Some HSF require a lot of carefully-applied force to get the clip to attach to the motherboard socket, and the risk of messing that up is much higher installing inside the case instead of outside.