Toilet bowl overfills before flushing, then stays drained
The flushing action appears to be working normally. A toilet flushes because the water level reaches the vertical level inside the covered portion of the bowl.

The refill portion is possibly because the tube that is inside the tank has become dislodged. Remove the cover and look for a small diameter tube, perhaps pencil diameter that now has a loose end. There will also be a larger diameter vertical tube to which this smaller tube attaches. The clip will be on either tube and they should be joined to allow the flow from the smaller tube to reach the bowl, completing the refill.

From https://www.handymanhowto.com/how-to-replace-a-toilet-fill-valve-part-4/