If your son's Gmail account was deleted, you will not be able to access OneDrive using that account. Once an account is deleted, access to any associated data, including files stored in OneDrive, is also lost unless the account can be recovered. Unfortunately, if you cannot recover the Gmail account, you won't be able to receive the code sent to that account.
If you have a phone number associated with the Gmail account, you might be able to recover the account by following Google's account recovery process. However, this process typically requires access to the original email or phone number linked to the account.
If you are looking to access your OneDrive files that were linked to that Gmail account, you may need to link a different Microsoft account to your OneDrive. If you had files synced to OneDrive before the account was deleted, you can log into OneDrive with your Microsoft account to check if any files are available there.
References: