Hey @AYEN
+1 to the other responses here, the spanning tree events are just a response to the physical port flaps. ie when a port goes down, spanning tree state moves to disabled, when port comes up it moves to designated/root state
https://documentation.meraki.com/MS/Port_and_VLAN_Configuration/Spanning_Tree_Protocol_(STP)_Overvie...
I agree, run some cable tests to ensure the cable is good, remove the AP and plug it directly into the switchport with a known working cable to see if you get the same issues. The port flapping events is purely based on Layer 1 (whether the interface is up or down), nothing to do with software.
---------------
If you found this post helpful, please give it kudos. If my answer solved your problem, click "accept as solution" so that others can benefit from it.