Yes, you can't format the drive that is being used by the operating system.
How to get around it: Download a live ISO such as GParted and put it on a USB stick. Boot from the USB drive and you should be greeted with a Linux GUI that has GParted already installed. Run that and format your SSD from there.
Alternative: Download VeraCrypt and install it on your Windows drive. Provide it some password you've never used and let it encrypt your drive with AES. While this doesn't remove any information it does overwrite everything with encrypted data. If someone were to get this drive it would be essentially unrecoverable. Simply deleting the partitions doesn't delete the data, so the GParted route is much less secure (though recovery from GParted isn't exactly easy, it would still take someone knowledgeable to pull it off).
Some SSDs offer AES encryption built-in. If this is the case it's worth looking into whether you can have the drive encrypt itself with its built-in encryption. Often this amounts to setting a BIOS HDD password which alters the keys on the drive so that nothing is readable anymore. If this is the case, this is by far the fastest option. Another thing worth searching/researching here is Secure Erase.