I had the same issue. I tried: resting Wifi timers, turning off energy optimizers, still Wifi constantly turned off. Following worked: https://appuals.com/why-does-my-android-wifi-keep-turning-off/
Method 5: Clearing Data of Settings
On Android, the Settings app holds all kinds of data from paired Bluetooth devices to changes made when adding a new Wi-Fi connection. Some users have reported that clearing the data of the Settings app made their issue disappear. Letxe2x80x99s try it:
Go to Settings > App Manager. Change the app filter to include ALL apps, including system apps. Scroll down and look for the Settings app. Tap on it and start by clearing the cache. Tap on Clear Data and restart your phone. Reinsert your Wi-Fi password and see if the issue repeats.