Hi Oblokccc
welcome to the Apople (user-to-user) Community!
Re: " i logged out of my iCloud not knowing I had an old phone number on file
so when I try to log back in I can’t use the number for the verification nor my iCloud."
Your Apple ID is the account you use to access Apple services like the App Store, Apple Music, iCloud, iMessage, FaceTime, and more. It includes the email address and password you use to sign in as well as the contact, payment, and security details you use across Apple services.
_____________________________________________________________________
Re: "How can I gain access to my iCloud that I lost I know all my information?"
See if you can log-in to your Apple ID account online, and edit / update your phone number / details there.
Eg: Try signing in to your Apple ID online on a "trusted" device.
(ie: one that is listed in your Apple ID account, so it will be a device that you can get a verification code from).
Here's the link to Apple ID online log-in page:
https://appleid.apple.com
How to: Get a verification code and sign in with two-factor authentication - Apple Support
Do allow 24 hours for the update to come into effect, (else re-starting a device may also update its details)
_________________________
Also: Check you are signed in (to all your computers / devices etc.) with your correct Apple ID / details:
How to: Sign in with your Apple ID - Apple Support
_______________________________________________________________________________________________
If the new phone number is the only way you have to get a verification code:
You may be able to re-gain access to your account (generally after a waiting period) by providing ID :
How to use account recovery when you can’t reset your Apple ID password - Apple Support
________
If needed: Apple ID Support webpage (info. / support / contact options, etc.)
Apple ID - Official Apple Support
All the best :-)