Pairing requires bluetooth, streaming requires WiFi,
https://support.apple.com/en-us/120421
Under iPhone Mirroring system requirements
Your iPhone and Mac are signed in to the same Apple Account using two-factor authentication.
Your iPhone and Mac have Bluetooth and Wi-Fi turned on.
Your iPhone is not sharing its cellular connection (Personal Hotspot is not in use).
Your Mac is not sharing its internet connection or using AirPlay or Sidecar.