There are multiple clients out there that fetches youtube transcript, I recommand:
However, Youtube banned all cloud providers IPs, so if you are looking for a production ready tool, I recommand using an API. The cheapest option I found yet is on RapidAPI:
https://rapidapi.com/invideoiq-invideoiq-default/api/video-transcript-scraper
You get 50 free transcripts, and 500 000 for just 9$, it retieves transcript in less than a second and it retrieves transcript from all major plateforms (Youtube, X, TikTok, Facebook, etc.)