Maybe what's needed isn't actually all that sophisticated, and is mostly old technology that's been used for decades?
I mean, a Mars habitat could be something as simple as: find a lava tube, unroll a giant plastic bag, inflate it with air so it's snug up against the walls, and put an airlock at one end? It'd be underground, away from radiation. It could be insulated to keep heat in.
The environment could be maintained by similar equipment to what's on ISS, but some of the problems would actually be easier on Mars because there's an available atmosphere and a landscape that can provide resources. No need to bring extra oxygen, and maybe not even extra water.
Obviously there's a lot of little details you'd need to work out, but Mars is a less hostile environment than ones we've already sent people to, like the moon or even low Earth orbit.
I don't think this is "20 or 30 years out". I think it could happen pretty quickly, assuming Starship meets expectations.
I think there is an economic problem, though: the first Starships to Mars are going to be stuck there for a long time because they won't have fuel for the return trip. Reusable ships are great, but if it's 10-20 years before any of them come back that kind of hurts the argument that reusability will make going to Mars cheap and convenient.