EspHome is a firmware you set-up to do what you want using an esp32 or an esp8266. It controls other hardware and lights and devices with direct wiring, talks on WIFI or serial, and can do MANY things…
The other thing is for bluetooth.
It’s like asking what’s the difference between a set of 5000 lego blocks and a pop-it fidget toy. One can do mamy mamy things, the other one thing.