How to move a WordPress Localhost straight to an online site?

You’re confusing WordPress.com and WordPress.org. The .org is what is used for hosting your own WordPress website on your hosting provider.

The .com is hosting your website using WordPress.com’s systems. There are some major differences between the two and it’s critical that you understand them.

First and foremost hosting on .com has severe restrictions on the themes and plugins that you can use. Ultimately you are limited to what is approved by WordPress.com.

Hosting your own domain allows you much more control over your website, the themes, and plugins you can use.

To my knowledge, there is no way to upload your locally developed website to WordPress.com. You can however deploy it to your own hosting provider.