Changing the domain name does not have to be the cause for any (long lasting) negative SEO effects. As long as you plan the move carefully and do it correctly, you do not have to fear ranking losses. In order to move your domain, you should tell Google that you changed the address of your website. You do so through the Google Search Console (GSC) and then you have to redirect all the content from the old domain to the new, with the help of 301-redirects.
The following steps and requirements are necessary in order to ensure the domain move goes through without a hitch:
the domain you used so far has to be verified in the GSC
the new domain also has to be verified in the GSC (using the same account)
you have to tell Google about the change of address for the domain, using the GSC
all content on the old domain has to be redirected to the new domain name, using 301-redirects
you need to check the internal links
get Google to crawl the new domain