If we briefly summarize the answer to the question of how to get Google Maps API Key, you can follow the steps below.
You must enter https://console.cloud.google.com and log in.
The API key is the key that validates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project
To generate an API Key:
• In the Cloud Console, on the project selector page, select or create a Google Maps project to which you want to add an API Key.
Go to the Project Selection page
• Go to APIs and Services > Credentials page.
Go to the Credentials page
• On the Credentials page, click Generate credentials > API key. The API key generated dialog displays your newly generated API key.
The new API key is listed on the Credentials page under API keys. (Remember to restrict API key before use.)
API Key and Billing Errors
In some situations, a watermarked “negative” Street View image may be displayed with a blackened map or “For Development purposes only” text. This behavior usually indicates problems with an API key or billing. To use Google Maps Platform products, your account must have billing enabled and all requests must have a valid API key.