If you have changed your domain name, you need to notify Google. Before notifying Google, 301 redirect your old domain
(x.com) to your new domain
After doing this, we need to notify Google.
To notify Google:
First, add your two domains
(y.com) to Google Search Console.
Second, open the panel for your old domain
(x.com) and click on the settings page at the bottom of the left-hand menu.
Third, press Change of Address and select your new domain name
(y.com) on the page that opens.
And you're done.
Note: If your new domain name does not appear here, it is because you have not added your domain name to Google Search Console.
After following the steps above, your new site will no longer cause SEO issues.
You can find more detailed information on the Google Search Console help center at https://support.google.com/webmasters/answer/9370220?hl=en