I’d like to echo what others are saying about building stuff you want to exist in the language you want to learn. I learned Flutter/Dart largely by building BeatScratch (https://beatscratch.io), and Rust entirely (and parts of functional React) by building Jonline (https://jonline.io).
But secondly, if you can, get work or your career path to let you build something in a new language. A lot of learning new languages (both programming and human) comes from social reinforcement and riding social waves. Smaller companies are a lot better for this than bigtech.
I learned Ruby at a company I was hired as a Java dev for initially (that had lots of Ruby staff). I learned Go and my first bits of React when a Ruby company I worked for was acquired by a Go company. My current company hired me to work on an Elm frontend without me having written a line of Elm in my life.