I use free hosting and a free site maker. After a while, I added my own domain via DNS settings. I faced a major problem after this. My new pages are not being indexed because Google detects duplicate pages.
I've made two property in Google Search Console with the new domain name and the old one because some links are at the top of search results and now I am afraid that by changing links I lost the position of google search.