Thanks for asking the Apple Support Communities for help. I am happy to look at this with you.
If you don't need the data on that older iPhone 4s, I recommend resetting the device back to factory settings. Be aware, this will erase all data on the device. You will then be able to put any Apple ID you wish on it. You may want to kale a backup before doing this. You can make a backup in iCloud or iTunes using this article: How to back up your iPhone, iPad, and iPod touch
Then, you can reset the iPhone to factory using this help article: Restore your iPhone, iPad, or iPod to factory settings
If you don't wish to go that route, I recommend forcing the Settings app to close: Force an app to close on your iPhone, iPad, or iPod touch
Then, restart your iPhone: Restart your iPhone, iPad, or iPod touch .
If you still have issues but prefer to save the data, I recommend trying to reinstall the iOS using iTunes. Just to ensure your data is safe I will again recommend making a backup of your data prior to completing this step. The same backup article provided above will help you make a backup.
Once your data is backed up, you can reinstall the iOS using this help article: If you can‘t update or restore your iPhone, iPad, or iPod touch
Please pay close attention when you reach step 4 which says:
When you see the option to Restore or Update, choose Update. iTunes will try to reinstall iOS without erasing your data. Wait while iTunes downloads the software for your device. If the download takes more than 15 minutes and your device exits recovery mode, let the download finish, then repeat these steps.
Once your iOS is reinstalled, test if the issue is still occurring. Thanks again and have a great rest of your day.