Another suggestion would be to go to a shop that has a fit machine to get your ideal position dialed in and then match it as closely as you can to the bikes you are considering, with minor adjustments in the crank arms, seat height and stem length.
Yes, a fitting rig is very good for a beginner, to establish his ideal bike dimensions. They didn't have those when I started in 1962, I just learned by trial & error. Now I know the sizing that works best for me by heart.
But the OP should be prepared to pay a fitting fee for this service, which can be a bit pricey. Which may or may not be credited to his subsequent bike purchase from that shop. He needs to find that out. But having a professional fitting done can be a good idea.
And you don't have to have a frame custom built to your dimensions, which is mega-expensive. As you say, swapping less expensive components like the handlebar stem and seat post can customize a bike's sizing very effectively. I often get a longer stem to give me more stretch-out room, on what is a relatively small, compact frame because of my short legs.