What is the model Apple TV box?
Identify your Apple TV model - Apple Support
Find your Apple TV model number - Apple Support
For the software remote on iPhone to work with the Apple TV box, both devices need to be on the same home network. For Wi‑Fi, that means the exact same SSID network name. Else the devices won’t be able to communicate with each other.
If the network name and/or password have been changed (on the router or access point), then that needs to be re-configured on all connected devices. You can’t operate the software remote until the Apple TV box network settings are correct. You may need to use a physical Apple TV remote, e.g. the one that came bundled with it. You could temporarily borrow a remote from another Apple TV user, if you know such person nearby. Else consider purchasing a replacement remote [Siri Remote].
For the legacy models A1469 or earlier, one should use the A1294 model remote (IR).
For the models A1625 or later, one should use one of the Siri Remotes (Bluetooth), but the legacy remote A1294 will also work for changing network settings. The Siri Remotes do have a software version dependency, though. But if the Apple TV box is on tvOS 15.4 (2022-03) or later, then any model remote will do.
Replacement remotes for the matching Apple TV boxes will need to be linked or paired first; else the remote commands will be ignored.
Pair a Siri Remote with a current model Apple TV box - Apple Support
Link a legacy Apple TV remote with a legacy Apple TV box - Apple Support - Internet Archive
The legacy remote can be used without pairing or linking with the current models Apple TV box.