Hi there Samanthaested29,
We understand you're unable to sign in to your Apple ID due to the verification codes being sent to an old phone number, and we'd like to share some resources that can help.
Get started by signing in with the other ways to receive that verification code here: Get a verification code and sign in with two-factor authentication
You can then use the steps from Two-factor authentication for Apple ID below to update your trusted number:
"Manage your account
You can manage your trusted phone numbers, trusted devices, and other account information from your Apple ID account page.
Manage your trusted phone numbers
To use two-factor authentication, you need at least one trusted phone number on file where you can receive verification codes. Consider verifying an additional trusted phone number other than your own phone number. If your iPhone is your only trusted device and it is missing or damaged, you will be unable to receive verification codes required to access your account."
Cheers!