First of all tell me if issue is the same booting your xperia in safe mode
Turn off the device.
Press and hold down the power key until the phone vibrates.
Wait until the Xperia™ logotype disappears.
Press and hold the volume down key. The device then restarts in safe mode.
To exit safe mode, restart the device.
So if your phone works fine in safe mode probably issue is caused by
- a conflict with a third party app that you installed after purchase
- firmware corrupted
So first of all you can remove all recent third party apps and if issue persists make a factory reset.
Remember that with reset you will loose all your datas.
for more information, https://talk.sonymobile.com/t5/Xperia-L/Xperia-L-WiFi-Problem-Pls-help/td-p/375989