Hello Ayan,
Thank you for reaching out to the Microsoft Community and I'll be glad to assist you today.
I understand that you are having trouble connecting your PC to a Wi-Fi network.
1. Are you experiencing this issue with just one particular network or with all networks?
2. Have you tried testing your mobile hotspot to see if you can connect to it?
I recommend trying the troubleshooting steps below to see if they resolve the issue.
1. Re-install Network adapters.
a. Open the Device Manager (Click Windows + X key)
b. Expand the arrow next to Network adapters.
c. Right-click your default Wi-Fi driver (usually Intel (R) Wi-Fi or Realtek Wi-Fi), select Uninstall device, select the Attempt to remove the driver for this device check box, and then select Uninstall.
d. Once uninstalled, restart your PC.
e. Connect your PC to the Wi-Fi network and see if it works.
2. Flush DNS Cache.
a. Open Command Prompt as administrator, execute the commands one by one and click enter for each command.
netsh winsock
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Once finished, restart your computer and connect your PC to a Wi-Fi network.
3. Disable IPv6.
a. Open Control panel > network and sharing center > Change adapter settings.
b. Select your Wi-Fi network, click properties.
c. Uncheck Internet Protocol version 6 (TCP/IPv6)
d. Click Ok and apply.
You could also click "forgot your wi-fi network" and try connecting it again.
I hope this information helps. If you have any questions, please let me know and I will be happy to help you further.
Best regards,
Gunasekar N