3 important command if WIFI is not working in your ubuntu machine.
sudo lshw -class network
Here, you can check which network adapter is in use; weather ethernet or wireless.
rfkill list all
This will list the status of all adapter. If your wireless adapter is hard block ‘yes’, check for the wifi button in your laptop to manually switch it on.
sudo service network-manager restart
After the changes made, you can try to restart network-manager service for changes to take effect.