Normally, you would connect the printer to your home Wi-Fi network (Wi-Fi router). This is called infrastructure mode and is the recommended way. The iPhone would be connected to the same router.
https://h10032.www1.hp.com/ctg/Manual/c05152483.pdf#d0e5722
The printer could also create a Wi-Fi network of its own for Wi-Fi direct connections (without using a router). Is this was has happened here? If so, change to a connection via a Wi-Fi router.
The HP DeskJet 3700 All-In-One Printer Series is listed as supported in About AirPrint - Apple Support. This means that an additional app should not be needed.
Use AirPrint to print from your iPhone or iPad - Apple Support
However, the printer manufacturer may provide an app (HP Smart) for setup, ink management, and similar purposes.
https://support.hp.com/us-en/document/ish_1716406-1413451-16