There is no law that says using a VPN is illegal in the country. However, accessing the provider websites of providers may not be possible as they may be on the block list.
Still,if you want to use a Virtual Private Network in high censorship countries, you should sign up, download and install apps before visiting the country.