When you press the button during Moonerang, you can see Valere do a “block” animation. As long as the moonerang reaches her during that animation, it will bounce.
It’s actually pretty forgiving, but you have to press the button earlier than you probably realize. You must press it before it reaches her. If you press it as it reaches her, it will fail.
Note: The best tip I can give you is to time it so you press when it’s 25% of the distance from hitting you. Once you see it a few times and understand the distance and timing it becomes natural.