Can't browse internet, but ping working

Thanks to zacharee1, had to release and renew ip addresses. Also had to flush ip addresses :

sudo ip link set wlan0 down 
sudo ip addr flush wlan0 
sudo ip link set wlan0 up
sudo dhclient -r
sudo dhclient

I was facing exactly the same issue, it's fairly obvious that's something related with the DNS and I finally solved adding the DNS servers of this way:

sudo vim /etc/resolvconf/resolv.conf.d/tail

write the DNS servers in the file:

nameserver 8.8.8.8
nameserver 8.8.4.4

Restart the NetworkManager service:

sudo systemctl restart network-manager.service

That's it! Try this...Thank me later!