Even if it doesn't work, you need the last compatible version of YouTube installed from your "Purchased" tab in the App Store.
If you aren't jailbroken, you can use a computer tool like iMazing or Filza Escapist (if available for your version). youtube old version ios patched
The most common reason YouTube stops working is "Version Checking." The app sends its version number to Google’s servers; if it’s too low, the server rejects the connection. By spoofing the version number, you can often bypass this. Even if it doesn't work, you need the