@keithamus I think your web development related advice is spot on. Learning transferable knowledge is always preferred to learning tools.
However, knowing one or more languages in depth is also very useful. And here we need to be honest, boring languages like Java and C++ reign supreme and are vastly more widely used than the hip and new languages you mentioned. I also don't think complicated setup is an bad for learning, it's what you have to deal with in most real projects as well.
@bart I agree with you overall, but I also think the "boring" languages like Java & C++ also have a high barrier and because of that they're difficult to dive into. I pointed at Rust and Zig because they're new systems languages that lack some of the footguns and don't have a back catalogue of outdated literature.
Obviously lots of places still use them, but as I see it, there is general divestment and the jobs available are for those that specialise. Newer langs, OTOH, have a wider door open.