I have used an online vet before for a query/second opinion, after seeing my usual vet - with quite a difficult situation. But also with trying to make a decision (whether to have an eye removed with surgery or carry on treating indefinitely) - the hamster was not that young. My own vet had said the hamster couldn't stay on antibiotics long term for a recurring infection. The online vet agreed with that. It helped to have a second opinion even though it wasn't what I wanted to hear.
I used the Just Answers vets. I used them one other time to double check a dosage of a medication (again after seeing my own vet and wanting to be sure as there had been a blip at first and it was different to the dose the previous vet had given). What this did in the end was give me confidence in my own vet eventually (who I had just changed to).
I would say the Just Answers vets are bona fide and quite good (you do pay a fee, it's not free) but ultimately they can only give general advice in theory. They can't prescribe, but they can find a vet for you in your area. They probably just do a search as you would.
But as the others say, if a hamster is unwell they need to be examined before any medication can be prescribed. For example if mites are suspected, a vet needs to do a skin scraping and check under a microscope to be sure it's mites or rule them out - before prescribing anti parasitic treatment. It's not good to give Invermectin on a hunch as it can be toxic to hamsters so they should only have it if it's absolutely necessary. Sometimes, what looks like it might be mites, can be something else (there are a number of causes of fur loss for example).
It is very difficult if your nearest vet is two hours away. Mine is an hour away and that's bad enough. I would register with that one though, and if you need to see a vet, ask them if they will do a phone consultation first. Some will and will then decide whether they can prescribe without seeing the hamster, or after seeing some photos and asking questions. I had this during lockdowns when vets weren't allowed to see pets but that was an unusual situation.
So for example if the hamster is elderly and has developed a lump and it's considered they are too old for surgery and otherwise seem fit and healthy, a vet "may" do a video consultation and prescribe pain relief and post it out to you.
Otherwise you would just need to do the journey. I would take each situation as it comes.
Do you think your hamster needs to see a vet at the moment? If you do use Just Answer, you could end up paying a fee twice if you still need to take the hamster to an actual vet.
If a pet store near you has a vet then that might be an option as well.
If a hamster is very old and you just feel you want to start some pain relief, would it not be possible just to see any vet? Most vets should know enough to be able to prescribe pain relief.