Hello famseer,
Thank you for reaching out to Apple Support Communities, and we'll be happy to help in any way we can. We understand you're having issues with accessing your iCloud and Gmail accounts. To get help with accessing Gmail, please reach out to Google Support for assistance as they are the best resource to help you out with that.
As for accessing iCloud, this article goes over the different ways that you can receive your verification code for your Apple ID: Get a verification code and sign in with two-factor authentication - Apple Support
If after taking these steps you're still unable to receive your verification code, you'll need to request account recovery as described here: How to use account recovery when you can’t reset your Apple ID password - Apple Support
When completing Account Recovery, please make sure to power down all devices that are signed in with this Apple ID, besides the one being used to complete the request, to assist with quicker handling as using other devices with this account during the recovery process could cause your request to become cancelled.
If you have other questions about receiving your verification code, please reach out to Apple here: Get Support
We hope this helps.
Cheers!