You need to install F-Droid and NewPipe. Follow these instructions:
Install F-Droid from here: https://f-droid.org/F-Droid.apk
Open F-Droid
Click the Search icon
Search for "NewPipe"
Click on the "NewPipe Lightweight YouTube frontend" result.
Click Install
Your app should now work correctly.