There's been suspicions that there were spies and traitors throughout the Ukrainian army and civilian population especially in the south where Russia was able to take large part of the southern coastline without much of fight (places like Kherson, Berdiansk, Melitopol). One example given was to take Kherson Russian has to cross a bridge which should have been blown up but wasn't, there's also a story that one of Ukrainian generals went missing on the day of the invasion and the Russians knew exactly where to go and where to strike (again all in the south).
This is all speculation but I know from speaking to my other half she's tells me there are no shortage of people in Ukraine who are willing to screw over their own people and Russia has planted or recuritied plenty of spies over the decades who feed information back to the Russian army. Then I stumable acorss stories like this which kind of prove the point:
https://liveuamap.com/en/2022/19-may-security-service-of-ukraine-detained-brother-of-former