Hi BMJ9891,
The following steps address what you're describing specifically, and should provide a solution:
If you forgot your Apple ID password - Apple Support
If unable to change the Apple ID password because you no longer have access to the trusted phone number or another trusted device, the best option would be to start an account recovery request using the steps in this link here: How to use account recovery when you can’t reset your Apple ID password - Apple Support
It is important to access your old Apple ID because without that, you will not be able to access the data associated with that Apple ID.
Cheers!