You must have to update your website URLs after migrating your site from live server to local or local to live server.
Go to your phpmyadmin
and select your database, then in SQL section paste the following codes (replace http://www.oldurl.com
to your localhost URL and http://www.newurl.com
to your existing live domain URL, do it carefully) and click Go.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name="home" OR option_name="siteurl";
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
It will replace your localhost URL with your new Live domain URL.
After that go to Settings > Permalinks
then just click Update/Save button then check your website & its internal pages, make sure you quit your localhost so you can see if URLs are now updated & not.
Keep in mind
you may still have to change some URLs in your website content may be which you’ve put.
Method 2
There is also a plugin called Velvet Blues Update Urls, install & activate it then go to Tools > Update URLs
then do the same put old url in old section and New live to New url section check all the boxes except Guid then click update, but its not guaranteed that all URLs will be updated.
I suggest run the above queries first, then you can also try this plugin as well.