What i normally do is to setup the mobile phone as hotspot and connect the laptop to the hotspot. In that way you are sure the mobile phone is on the same network and can access the laptop.
Found that the issue was checkpoint VPN client. Even with it disconnected and client shutdown, it still caused issues.
When I uninstalled using the uninstaller in the DMG the issue was resolved.
I was facing a similar situation in the link
https://apple.stackexchange.com/questions/281662/cant-ping-mac-from-pc