I was trying to connect from Linux to the wifi hotspot, but it was failing:

NetworkManager[886]: <info> [1612392063.1838] manager: NetworkManager state is now CONNECTED_LOCAL
NetworkManager[886]: <info> [1612392063.1831] device (wlp2s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
NetworkManager[886]: <info> [1612392063.1159] dhcp4 (wlp2s0): state changed unknown -> timeout
NetworkManager[886]: <warn> [1612392063.1158] dhcp4 (wlp2s0): request timed out
Then it started working after i have disabled and then back enabled the Wi-Fi access point (hotspot) in in the smartphone.