Managing RNG is a skill - develop it
You got Rock Slide flinched 3 times and lost. Oh no!
New players - please listen: managing RNG is a skill and something you should think about when teambuilding/playing. You aren't losing to Rock Slide flinches/whatever because you keep getting unlucky, you're losing to it because you don't have a game plan that accounts for the risk of getting outsped and flinched.
Think about it this way - you put the move Thunder on your Jolteon. It has 70% accuracy; you need it to hit that Milotic or you lose. So you click Thunder and you have a 70% chance to win and a 30% chance to lose. This is a pretty big miss chance, so what do people usually do? They either give Jolteon Thunderbolt instead or make sure their team can set up rain. This is a teambuilding strategy that helps Jolteon function.
You need to approach opposing RNG and stuff like Rock Slide with the same mentality. Have a teambuilding strategy that helps you avoid RNG (or use it to your advantage). If your whole team is slower than Mega Aerodactyl, then you have a 30% chance to get flinched by its Rock Slide and losing - just as if you were gambling on your Thunder outside of rain hitting its target. You can do better than that. Consider Wide Guard, Scarf mons that can outspeed it, Fake Out and double-target it, use Swift Swim/Chlorophyll/Prankster Quash, Tailwind or Thunder Wave to outspeed it....plenty of options.
This is also one of the reasons why stall/slow and bulky teams without speed control options tend to do poorly in VGC. If your Pokemon are moving after your opponent's, you are giving them more opportunities to RNG screw you with crits, additional effects, and flinches. Why would you let that happen? You should account for this in teambuilding.
In-game, you can and will still get unlucky on occasion (I just lost a game yesterday because Sneasler's Close Combat critted my Milotic through Coil defense boosts), but if you account for these scenarios and attempt to minimize them, it will increase your win rate. It will also make you a better teambuilder/player.