Unironically, if you want something as mature as Rails, with batteries included, and static typing, the closest in my mind is aspnet core.
It’s honestly a really underrated framework, smartly designed, with probably the best ORM that exists and a great ecosystem.
Unfortunately, the documentation is painfully bad and the Getting Started guides are really boring compared to Rails or Django.
There may also be Laravel but I can’t say anything about it since I never tried it.
LINQ is the thing I miss most in every other stack I’ve used. It’s a thing of beauty even if you don’t use EF.
Like you say, trying to learn to do something in Asp.net core can feel like pulling teeth. I'm usually surprised to find there's a first party library that does what I need, yet I couldn't find it for hours.
I have complaints about Laravel, but I think it's a lot easier to find examples, and modern PHP has static typing improvements. But I would much rather use C#