Do not install the Play Store first. Follow this sequence:
Why the reboots? Android 4.1.2’s package manager needs a clean state to link the three apps correctly. Play Store Apk Android 4.1.2
Android 4.1.2 stopped receiving security patches in 2016. After installing the Play Store APK, do not use this device for online banking, shopping, or logging into sensitive accounts. Use it offline or behind a very restrictive firewall. Do not install the Play Store first
Google officially ended support for Android 4.1 Jelly Bean years ago. The last Play Store version that supports API level 16 (Android 4.1.x) was released back in 2021. Since then: Why the reboots
However, you can still sideload the final working Play Store APK for Android 4.1.2 to download older versions of apps that remain compatible.