I always tell engineers that getting thrown into legacy code is a fantastic learning experience and also a great opportunity to stand out. In my pervious job I had to convert an old monolith into microfrontends while also adding new features to the platform (https://thegrayarea.tech/microfrontends-hype-or-genuine-silver-bullet-8373a6e67ac8). Over those two years I learned more than ever before, and it enabled me to quickly move from senior engineer to staff, so well-worth the effort.