I asked the same question two months ago: Change the duration/length of music with … - Apple Community
First of all, no - as of December 2024 there’s no such tool built into Final Cut Pro. I also spent a lot of time searching for third party plugins that can do this in Final Cut Pro, but unfortunately - there is nothing. The best way to do this currently in Final Cut Pro is to cut together parts of the music or sound track to shorten or extend the duration. I recommend resizing the tracks in Final Cut Pro to make them as tall as possible which will make it easier to see the waveforms and find parts to cut/fade together.
I highly recommend submitting this to Apple as a Enhancement Request: Feedback - Final Cut Pro - Apple The more people submitting this as a Enhancement Request, the more likely it is that Apple will implement it.