Hi Scotty I have a 2010 Toyota Prius. The problem is even though the brakes work as normal sometimes while pressing the brake pedal it works fine but suddenly whilst I'm still braking the brakes stop working even though they were working just a second ago whilst I was still using the brakes.

Could you please help me?

often just a worn out brake master cylinder, if no leaks exist anywhere you can see on the system and all 4 wheels, replace the master

Thank you Scotty