I think you don't put a clear description of your problem. You say that you've lost the APFS encrypted USB drive password but how you can try this way - copying the data from it and then reformatting the USB?
I suspect you want to say that, you've formatted your USB drive with APFS encrypted, but when you connect it to your Mac, the external hard drive doesn't ask for a password on Mac. If it is, you can go to check if you've saved the password to the keychain by mistakenly checking the "Remember this password in my keychain" option when the first time the USB is connected to your Mac after formatting to APFS encrypted.
To verify that, click on Launchpad > Other > Keychain Access. Search for your USB drive name in the upper search field. If the APFS encrypted USB drive is listed below, it means you've saved the password to the keychain. Removing it from here to make the drive ask for the password again.
Or, I also argue that you may want to say, you've already forgotten the password. In that case, you have no choice but to reformat the drive for later usage. Because an APFS encrypted drive offers you no chance to access it without a password.
To format your USB drive, you need to:
- Connect your USB drive to your Mac.
- Open Finder > the Applications folder > Utilities > Disk Utility.
- Select your USB drive and click the Erase button.
- Set a name, choose a format, and pick up the scheme (GUID) for the USB and then click Erase.
- Wait for the process to end.