Ok, next check your wifi signal strength is ok.
If you have a laptop / PC open the cli and use ping with the Pi's IP address.
If not, get a ping app on your phone (I used vernet from Fdroid), check the settings have a really high number of pings (ie 60) and ping your Pi...
If the ping times out or the response times are all over the place with , then it's either your wifi or something else on the Pi / phone.
I presume your only running home assistant on that Pi, nothing else?