Also, maybe there needs to be mineral ore near the surface of the crust
Iron is pretty frequent. A planet without iron is rather seldom. App. 1/3 of Earth is iron (most is in the inside.)
All elements heavier than helium are produced within the last phase of a star's life. Among the most synthesized elements are carbon, oxygen, silicon, nitrogen and iron.
See
Wikipedia: Overview of consecutive fusion processes in massive stars
You can roughly estimate, the lighter an element the more frequent it is, and the more protons a nucleus has the more seldom. Point is, most of that stuff ain't native but bond into molecules, especially the highly reactive elements like flourine, sodium, calcium, lithium, oxygen et al.
Everytime a star dies, a lot of that stuff is hurled into space.
And there is a lot of stars. Many are really giant ones. Our own "huge" sun is just a tiny yellow dwarf. See
Wikipedia: Size comparison of known stars
And there has been a lot of time for many stars to be born, lived and died. That's why there is so much stuff besides hydrogen and helium out there.
I wouldn't be surprised if somewhere in the universe there were gold nuggets the size of a small town.
I can imagine with some the greed set in. Right?

But before you build spacecrafts and start another gold rush:
" Rincewind had a feeling that some sort of trap was being set.
'Yes?' he ventured.
[the Patrician,] 'And if every man [...] had a mountain of gold of his own? Would that be a good thing? What would happen? Think carefully.'
Rincewind's brow furrowed. He thought. 'We'd all be rich?'
The way the temperature fell at his remark told him that it was not the correct one. "
[Terry Pratchett,
The Colour Of Magic, Corgi 1983]
Hydrogen is anyway by far the most element in the universe. 76% of all mass and 93% of all atoms in the universe are hydrogen. So, when you have oxygen it's very probable to get water.
Silicon is the element stone mostly consists of. And since there is also a lot of nitrogen, carbon and oxygen, the elements needed for life, so for an inhabitable planet are not so very rare.
Water is in fact not that very rare in universe. Liquid water is.
Point is, most of the universe is very cold, pretty near to absolute zero of -273.15°C. While stars are feakishly scalding, at least 40M°C up to 4T°C. If you imagine a linear scale that shows the temperature range the universe offers, and then look at the span from 0°C to 50°C - that's roughly at where proteins start to denaturize; that's why you need to cook some food to make it harmless, for example the poison in uncooked legumes - that's just a very tiny narrow span very left on that huge scale where life is possible. And exclusively rare.
But before you can even think of something like farming, creating tools, civilisation, industrial revolution, capitalism, decandence, climate change, war ... - long before humans developed mining they used metal from
meteors. This already is native. Instead of ore for which metallurgy needs to be developed to get iron from it. It was rare and not seldom preserved for something
special. And not seldom high quality. Because not seldom besides iron it also contains nickel. As almost likewise modern steel in iron age it was high tech from a far away future - there has to be life at all in the first place.
Can a planet without life be inhabitable?
No.
For higher life forms oxygen is needed to breath. But oxygen is highly reactive (That's why it delivers animals the energy to live.) Without the invention of photosynthesis, which produces permanently new oxygen again, all oxygen would be bond.
Additionally first you need
autotrophs, organisms that can produce organic material from mineral material.
Or in a single word: plants.
Imagine Earth had never developed life at all. There would be the continents almost like we have them today. There was a little less land. Some land would a bit lower, because of the lack of layers of coal, oil and gas. And some land, also mountains, would be absent or a lot smaller. Because of the lack of lime stone - no molluscs, no lime. So Hawaii would exist, 'cause it's volcanic origin, but the Bahamas not so much, 'cause their origin is from corals.
There would be wind, clouds, rain, fresh water in rivers and lakes, salt water in oceans, waves, beaches and tides, snow and glaciers... I don't know which color the sky would have, since without the
great oxidation event, the atmosphere contained no oxygen, and had another composition. A physician can answer that question, which color the sky had.
But anyway Earth was sterile.
This means, you also cannot plant any seeds you brought with you in your spaceship. Well, you can, and they will germ, but shortly die again. There is no humus and no microorganisms which are needed by a plant's roots to get nurishment from the soil.
No oxygen to breath, and no food to eat if there is no life at all in the first place. Such a planet is uninhabitable, even if it was in the
habitable zone and posses all the needed elements
and is cooled down enough.
Here we have the classic paradox of booting again:
You need life to get life.
Well, of course you could bring some basic life forms with you as kind of a boot medium. But by the experience with our planet the booting may take a while until the system reached a boot level you can start some jobs.
....















