Rui Santos shows us how to make two ESP8266 to talk:
In this project you’re going to make two ESP8266 talk with each other.
How it works? You’re going to set one ESP as an Access Point (Server) and another ESP as a Station (Client). Then they’ll establish a wireless communication and the Client sends a message to the Server saying “Hello World!”.
How to Make Two ESP8266 Talk – [Link]
100+ ESP32 Projects: Guides and Tutorials
https://lededitpro.com/esp32-projects