Text Message Forwarding code not showing up
Handoff works over bluetooth primarily, so you don't really need WiFi connectivity. Start by toggling the bluetooth on both devices and see if other handoff / airdrop operations work. That will rule out interference and other issues on the basic connectivity.

You do need to be signed in to the exact same iCloud account on both devices, so checking the clocks of both and signing out and in can often verify iCloud account is operational on both sides.