Including transactions in a block - rules and time / technical aspect
There are no real rules, per se, just various optimizations.

ASICs are fast. They can burn through the entire 2^32 possible nonces for a given block in seconds, which requires miners to use the extra nonce field in the coinbase transaction to generate a new block header (since altering the coinbase transaction changes the merkle root) and try again.

This process can be done in parallel - a miner can prepare the N+1 block header by changing the extra nonce in the coinbase transaction while they are checking the Nth block header's 2^32 nonce values.

Similarly, transaction selection can also be done in parallel - a new block template can be created while a miner is operating on the previous one, and the new template's block header can simply be used when the miner swaps out the previous one after exhausting the nonce space (unless they find a valid block, in which case the template must be updated again).

This is what most mining pools do - the block template generate is done in parallel by the mining pool, and they continuously pass updated block templates to all of their miners. This allows them to quickly include high fee transactions in potential blocks while still ensuring that they are looking for a solution at all times.