How to turn WiFi on with a non responsive screen? So I own a Moto G4 plus

The touchscreen on this phone has stopped responding.
Since I'm in midst of a lockdown for a long time. I can't buy a new phone or get this one repaired.
I do want to keep using Whatsapp Web till then.

A couple days ago the wifi on my phone turned off for no reason and I can't use Whatsapp web anymore

How can I turn on the wifi again in this case?
You will need an OTG cable. It allows you to connect various devices to your phone.
The way to control using the OTG cable via USB is to connect one end to the phone and the other to the keyboard.
All keyboards may not work, just like not all smartphones support the OTG cable (all tablets do).
Instead of a keyboard, you can use a regular computer mouse by connecting it with an OTG cable, via USB.
You can even write text using the virtual keyboard. The cable itself is inexpensive.
Of course, this is not a 100 percent solution, because it is unlikely that someone will carry a mouse with him, let alone a keyboard, but at home or at least to copy important data, this is a great way. Recommend. The main thing is that your phone supports it.