Yeah, this one's common. If you're connected to a corporate VPN or remote work network, you often can't install apps from the Microsoft Store, which is how HP Smart is distributed for Windows.
The fix is simple: disconnect from the VPN before you install the HP Smart software. Once the printer setup is completely finished, you can reconnect to your VPN. You don't need to be disconnected for the actual printing later, just for the initial software install and device discovery.
If that didn't work: If you've disconnected the VPN and it still fails, check your laptop's Wi-Fi. Even if it's connected via an Ethernet cable, you need to ensure the laptop's Wi-Fi radio is turned on during setup so it can communicate with the printer.
Heads up: Obviously, only disconnect from the VPN if your company policy and network security allow it for a few minutes.