Assuming that the ransomware has already blocked your access to your own computer, you may need to download and install the bootable antivirus on a different PC. Windows Defender Offline is a popular option on Windows for many reasons: it is by the same manufacturer of the operating system, it comes preinstalled on all Windows 8/8. 1/10 devices, and is easy to run.
Depending on the application you downloaded, you can install the bootable antivirus on a CD or a flash drive, but it’s advisable that you use the latter for easier access because not all PCs have disc drive (like netbooks). Download the antivirus onto a computer that does not have the virus.
What Safe mode does is that it allows your computer to run using only the most basic and necessary program without using third-party applications, including the viruses. This way, any malware that may exist in your PC will stay inactive and can be easily removed.
If you can now access your computer again normally (without going into safe mode), it means that the ransomware has been successfully deleted.