@thewordgirl Some rescues use foster homes for the animals. It can vary from the rescue only using foster homes (not actual shelter facility), to shelters that use fosters to give the dogs a break from the shelter or for medical recovery. If the rescue only uses foster homes, then the dog usually stays in the foster home until they are adopted. Shelters that use fosters tend to be more temporary and they might only stay for a few days to a couple weeks. There are also a few rescues that might allow for a trial run to see how the dog settles in over a couple weeks before finalizing the adoption, if it doesn't work out the dog can go back. Fostering can give you an idea on caring for a dog, but can be tricky as the dogs might have some behaviour or medical issues that can make it more challenging than you might experience with a dog of your own.
Look up local rescues and shelters and see what their policies are like. Some might prefer people who can make a longer commitment, but many will take what they can get and work with you.
Pet sitting for a friend might be a good option. You can know more about the dog, meet them, and hopefully have an out if it's really too much. Even starting with a weekend can give you an idea of dog care, but a week or 2 really gives an idea on how a dog will fit into your life. The dog would have a home to go to, so no expectation of you keeping the dog after, and it's a set time line so you don't have to be worried about the dog staying months when you expected a week or two.
A lot really depends on finding a dog that suits you. If you are very active and can incorporate a dog into that, there are some breeds that will be great. Those some breed can be a nightmare for someone who stays home a lot. A lower energy dog might not do well with someone who is super active as they might get left home a lot. Size, coat type, and breed purpose are all things to consider. Even if you go the rescue route, finding a dog that suits your energy level will help a lot. Do some research into different breeds and types (like terriers, hounds, retrievers, toy breeds etc) to see common traits and help determine what you like and do not like.