Did you perform a clean install of macOS by first erasing the drive when you first acquired this Mac? If not, then I highly recommend doing so unless the Mac was purchased directly from Apple. I always recommend a clean install of the OS when purchasing a used computer so that you know the OS & file system are good and there is not any malicious software installed.
As the error message says you cannot upgrade the OS until the Filevault encryption process completes. If you just enabled Filevault, then it can take a day or more to finish encrypting depending on how much you use the system, how large the drive is, whether it is a hard drive or SSD plus the health of the drive. The encryption process becomes paused whenever a laptop is only using the battery so keep the laptop on the charger. There is no way to stop the encryption/decryption process once it has been started.
The only option if you don't want to wait is to perform a clean install of macOS by first erasing the whole physical drive (the physical drive is hidden by default in Disk Utility). Just make sure to have a backup of your data first if you have any data on the system.
https://support.apple.com/guide/disk-utility/erase-and-reformat-a-storage-device-dskutl14079/mac
Before upgrading macOS make sure to have a good backup just in case something goes wrong.