Your ability to pop open vscode and slap some JS in it to start a web-server in a few lines is the product of decades of SW frameworks that have made thousands of assumptions along the way to increase expressive power while tucking complexity under the hood. Feel free to provide a counter-example vs a generic statement.
Same as in this Rust example then. The Axum example is basically the same as its equivalent in JS. I've also seen similar abstraction in Python (Django, Flask), Ruby (Rails), Elixir (Phoenix) etc.
I will agree insofar as webdev seems to proliferate use of magic. ASP.NET core also uses a ton of it, which I hate as well. I'm not sure why that one particular area draws the people who love magic for their tooling, but it at least partly explains why I wish I could just hide in a backend hole and avoid 90% of it (Dependency Injection can be very full of magic as well but that's another tech tool I wish would go away).