Except places like North Korea, where bans are applied by default because there are virtually no Internet access points, and those that do are under tight government control, in other countries, VPN bans do not work at all. In principle, in countries such as Turkey and Iran, the demonstrative use of VPN in public places is undesirable, since ordinary people, although extremely rarely, can report this to law enforcement agencies. However, as life shows, in countries where virtual private networks are illegal, the use of VPN for personal safety of a person is not done demonstratively.
In all countries where the use of VPN is prohibited by law, intimidation is the main tool of the government. The authorities are spreading false information that they can track anyone using a VPN, and that law enforcement agencies in the country often find and arrest lawbreakers and suspects. This is usually not true, as it is almost impossible to crack the encryption tunnel created by a professional VPN.
Technically, the government can prevent its citizens from using the VPN by blocking the IP addresses of the VPN servers, but this is almost impossible as the addresses can change faster than the government will block them. If you become a client of any VPN application, you will have VPN servers from “only” 120+ countries at your disposal. There are several servers in each country, you can choose any of them as you wish.