If you have bad internet use these settings!!! Specifically Client, Server send rate and Bandwidth limit. I have 1mbps up and have been lagging a lot but these settings helped so much. :
How to Send Data from Arduino to Webpage using WiFi
ESP8266 Building Blocks: Send Data to a Web Server With GET : 3 Steps - Instructables
ESP32 sends data to the app over WiFi in realtime. JavaScript (ajax) - Internet of Things - MIT App Inventor Community
Arduino Esp8266 Post Data to Website : 6 Steps - Instructables
Web server with esp8266 and esp32: multi purpose generic web server – 3 – Renzo Mischianti