Self Encrypting Drives (or Devices) always encrypt the data that is passed to them for storage. They use a key called the Data Encryption Key (DEK). This key is known only to the disk firmware. The key never leaves the disk. All data that is passed to and from the disk is encrypted and decrypted with that key. When the disk is powered off it becomes locked. When powered on it requires a password to unlock the DEK and start reading/writing again. If there is no password set then the disk doesn't appear to be encrypting/decrypting.
Now, when you set a password - an Authentication Key (AK) - the drive knows to prompt you for it and is unable to decrypt/encrypt anything until it is unlocked. [There are actually two keys, but that's more detail than is necessary here]
This is also the reason it's possible to change the password (the AK) without having to decrypt and re-encrypt the entire disk contents.
The Secure Erase feature present on many drives takes advantage of one of the side-effects of encryption. Encrypted data looks like random characters until you use the right encryption key (DEK) to decode it. So, to erase a disk you simply change the encryption key. None of the old data is now able to be decoded, i.e. it is erased.
Seagate produced a nice document detailing all of this in relatively readable language. https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100515636c.pdf
Also, if you're on Linux, or can use a USB bootable linux distribution, you can try the suggestions in the answer to this question:
https://superuser.com/questions/1530363/how-to-securely-erase-an-nvme-ssd