I want to create a work that is eternally stuck in the steam age, because they have no means to generate electricity. What elements would have to be missing/rare in the planets crust to make electric dynamos impossible/inefficient? For example, if dynamos require copper, there could be extremely low concentrations of copper in the crust, so that harvesting it would be impractical. I am not looking into any social or religious reasons electricity is not used, but that electricity would be so hard to generate that using it is impractical.
I don't think fundamentally changing your world's chemistry is a very strong path forward, you'd have to write off too many physics constraints or cosmology constraints to explain how you end-up with an Earthlike planet that's nothing like Earth.
However, there's one strong area that is easily written off - read below.
Production Issues: Take away fossil fuels: coal/oil in particular, and you effectively destroy the path forward from discovery of electricity to its practical uses. Without oil/coal you'd have to discover Uranium/solar-power to generate electricity portably.
People could still develop hydroelectric or wind-electric generators, but the problems there are that electricity generation needs to be portable because:
Transportation issues: Electricity generation is Direct Current (DC) and DC doesn't go very far. Edison Electric was building power plants practically for every neighborhood, almost block-by-block. Alternating Current (AC) changed all of this and centralized production. AC transmission easily goes further than DC transmission. Without oil/coal to fire the steam-generators, electricity generation block-by-block simply doesn't make sense and so you effectively kill the technology tree.
There's barely any demand where there's water power or wind power, and so those power sources are DEPENDENT upon AC transmission. If someone were to build a little dam somewhere to make hydroelectric, chances are it isn't near a dense population center to be consumed. So it's stuck in the "academic curiosity" phase.
HVDC transmission (high voltage DC transmission) has so many technological issues that it wouldn't be discovered for a very long time, without electricity being consumed, there's likely no reason to discover it.