MY GALAXY A21S Had issues with WIFI randomly switching off at any time and not connecting to the Internet automatically. However I have fixed this, I logged into the actual router and found it was set to 5.0 ghz. I have fixed the issue with my A21s by changing the router setting to 4.2 ghz. No further issues.
Hope this helps, Not always the phone.