If you want to do anything at home to control from outside then start with an external IP, the advantage is that even if there is no internet the devices at home will get along with each other. You can have your server done on a purchased virtual VPS server, you don't worry about exposing your home network or power consumption, for $13/year you get e.g.
For fun I threw Blynk in there, on an Android phone the last version of the application that allows you to point your server, it can no longer be downloaded from Google PLAY, on ESP a program written in Arduino and it works.
If you have a NAS drive, you can install your home ThingSpeak, install docker, download the finished image, run it as a virtual computer, it's fun for 1 hour in total to grasp once you've more or less assimilated a few tutorials. The phone app allows you to type in a server from your finger, so it doesn't have to be the one. Although the home one is more poor, at least such a ready-made one, you can just install it from the freshest sources (not on NAS, here only docker images), the image for the docker can be and 8 years old.
Also you can buy yourself a Rasberry for 200 (1000 now?) or a Fujitsu S720 terminal for 72 PLN with shipping. Rasberry consumes only 0.5-5W, and the terminal with 20W, but there are better ones for 2-3 hundred, more inside, and less consumption.
On the terminal also you can throw some Linux, docker and do the same as on the NAS, the possibilities are greater, because you decide what you upload, but must buzz the other device.
Got servers are paid, you get free coins to start (Blynk), the ability to do a few channels (Thingspeak), and you have to pay for more, they are not amounts that would justify building your own server, unless someone is doing it as a hobby for fun anyway.
You also don't need any server in total, ESP can be a web server with websockets, you log in to its IP, the control panel opens:
you can control buttons, sliders, watch the data coming from ESP, you can redirect the port having an external IP.
Of course nothing will "do itself", you have to write it yourself, C C++ HTML js css, upload to ESP.
Or use ready-made solutions.