It is not so trivial thing but yes, your understanding is on the right track! If Bitcoin were to fork to increase security against quantum threats, for a while, we might see two versions of Bitcoin running side by side: the original and the new, more secure version. This transition period could indeed make the new chain more vulnerable to a 51% attack, primarily because, in the beginning, fewer miners would be securing it, leading to a lower total computing power, or hashrate.
In such scenarios, the community and miners play a crucial role. As more miners and users start to support the new chain, its hashrate would increase, making it more resistant to attacks. The idea is that if the new chain offers better security against quantum threats, it would naturally attract more support over time, making it the dominant and more secure version. So, while there might be a temporary vulnerability during the transition, the collective action of the community and miners can help safeguard the network as it shifts to stronger cryptography.
Additionally, while SHA-512 is more complex and offers a longer hash, switching to it from SHA-256 isn't a straightforward quantum fix. For quantum threats, exploring cryptographic methods specifically designed to withstand quantum attacks would be a more targeted approach. I hope it makes sense.