Since you're a junior I'd recommend not to learn another full stack framework. Laravel and Rails can both be used to build the backend and the frontend of websites, yes, but that's not how modern web apps are built. Modern frontends are separate projects and more sophisticated than what Laravel and Rails can do for the frontend.
Since you already know Laravel I'd recommend to learn something different. So if you really want to focus on the backend the best technology stack to get a job is Java. Learn Spring Boot. And then learn some more Java technologies that you find interesting. The Java universe is huge! Quarkus might be a good choice after Spring Boot.
Since you're a junior I'd recommend not to learn another full stack framework. Laravel and Rails can both be used to build the backend and the frontend of websites, yes, but that's not how modern web apps are built. Modern frontends are separate projects and more sophisticated than what Laravel and Rails can do for the frontend.
Since you already know Laravel I'd recommend to learn something different. So if you really want to focus on the backend the best technology stack to get a job is Java. Learn Spring Boot. And then learn some more Java technologies that you find interesting. The Java universe is huge! Quarkus might be a good choice after Spring Boot.
Thank you 👍 for your recommendation but we had java courses in university, I don't find it interesting for me 😢