Our Earth and Venus each keep a thick atmosphere because of a magnetosphere. Most terraforming scenarios of Mars involve transferring water and other gases from the ground to the atmosphere.
We now know Mars won’t be able to keep them. We also now know the process is happening naturally.
So, if Mars got a magnetic shield (even an extra thin one like Venus) to protect against solar radiation, it would be able to held water oceans again.
So, how can we create such a field ?