Which (Windows or macOS) are you using to transfer files?
: Apple no longer signs iOS 7.1.2, so you cannot activate a fresh restore unless you have SHSH blobs and use a tool like iOS-OTA-Downgrader. If you already have a working device on 7.1.2, sideloading the old IPA is your only path.
If sideloading and plist editing prove too complicated, you can bypass apps entirely using the Safari browser. Launch on iOS 7.1.2. Type ://youtube.com into the URL bar. Youtube Ipa For Ios 7.1 2 Download
Running the YouTube app on iOS 7.1.2 (commonly used on the iPhone 4) is challenging because the official App Store no longer supports this version
: Use a tool like Xcode on Mac or legacy versions of iTunes (12.6.5.3) which still include the App Store. Which (Windows or macOS) are you using to transfer files
Follow these steps to safely sign and install the legacy YouTube application package onto your iOS 7 device. Step 1: Download the Legacy YouTube IPA
Safer alternatives
While some methods allow over-the-air installation, the most reliable method for iOS 7.1.2 involves a computer running Windows or macOS.