The fact that Google does not show your website in the search results can have several reasons and can therefore not be fixed by a universal trick.
Has the domain already been indexed by Google?
Most often, however, the reason is that Google has no knowledge of the new domain yet and thus cannot take it into account in the results. The first thing you should do is to check if Google has indexed your domain in any way. You can easily check this with a search using the term "site:yourdomain.com".
If this search remains without concrete results, Google has no knowledge of your domain yet and a registration in the Google Search Console is necessary. To do this, please log in to your Google account and follow the steps described here: support.google.com/webmasters/answer/10267942