If you have moved your site to a new domain, you need to perform a 301 redirect. This will make it easier for you to make the necessary transition for Google to index the new URLs at the new address. Also, your positioning in Google Search results will be less affected.
Step 1: To perform this operation you have to edit or create a file that is in all hosting services called .htaccess for which add the following line of code:
redirectMatch 301 ^(.*)$ https://www.newdomain.com$1
Step 2: Submit an address change request to your verified site using https://search.google.com/search-console/
open the change direction tool
The address change serves to notify Google of new URLs for existing content. This way, we can update our index to reflect the new domain of the pages. The updated index state lasts for 180 days, and during this time, Googlebot must crawl and index the pages of the new address.