you should count the amount of strokes it takes you to hit the wall once you reach the flags, then let’s say you had a stroke count of 3, you would do 2 normal strokes and then on the third go on your stomach to do a freestyle flip-turn
easier said than done for me