And if mining is banned? Does it mean Bitcoin mining will automatically stop? No, mining won't stop. What will probably stop, but only temporarily, are those operations of mining farms. Individual miners will continue to mine. And those huge mining companies will just hop from one country to another. There is always a nice place to move.
Don't imagine things and be terrified of those. You are creating an impossible scenario and then emotionally react to it.
Yeah, it's not like all government will try to ban mining, and even if some government try to ban mining, there are still so many ways out of that. People won't just stop and give up just because the government told them so, they will surely find another ways, since mining is also so profitable for them, of course they won't let it go. We also really need mining, so of course people in this cryptocurrency world will try to find a way, don't need to worry.