I'm using composer to manage a Drupal 9 instance. I'm brand new to composer and have no idea what i'm doing. That being said, I've successfully set it up and have used it to install modules and an admin theme. I just purchased a theme and realized that I don't know how how to upload it with composer. For modules and the admin theme I installed, I used composer require drupal/name-of-module(or theme) but this theme doesn't have a shortname and isn't on drupal.org (but rather on my local machine after downloading it). How do I go about uploading this theme with composer? I've looked through the composer documentation but can't find anything about this scenario.
You might want to have a look at the documentation on drupal.org:
It's a lot to digest, but it goes into quite some detail on how to use composer and git to manage your site.
The gist of it is this:
You use composer to download code (modules, themes, libraries, ...) that is available somewhere on the internet (github, gitlab, npm, your companies private repositories, ...) and manage the dependencies between the different components that you download.
You use git to manage your project, that is to say your
composer.json that defines how and where to get external components, but also your custom code, for example custom modules that you write but that you don't make publicly accessible somewhere, but also that theme that you have purchased. Git allows you to do version control for your project, so that you can safely make changes, go back to a known working state if you break something, and create tagged releases for fixed snapshots of your code.
Once you have all set and your site is running on your local machine as you expect it, the next question is how you get that onto a server, so that your site will become publicly available. This is what I would understand as "uploading" (and there are, as usual, multiple possible ways), but I think this is not what you meant.