Usually mining pools, nodes, and miners will choose a longest chain to continue their work
You know, the miner should choose to mine the longest chain
Once again, as I've said multiple times above, nodes and miners choose the chain
with the most chain work, which is not synonymous with the longest chain.
In the event of a fork of just one or two blocks where both chains have the same amount of work, then nodes will generally pick the chain which they saw first.