These bandwidth-exhaustion attacks can't be prevented.
You can indeed use your firewalls to drop the packets before they reach your application and trigger a response (if the packets are valid and not pure garbage) so you don't waste resources and outbound bandwidth by replying to them, but the packets will still use and possibly overload your downstream connection which means packets from legitimate users won't be able to reach you.
The only real solution against this is to have more bandwidth than the attacker, either by yourself (if you're a big company you have the money to do this, and doing it yourself is beneficial for some companies like ISPs who need lots of bandwidth anyway) or using a service like Cloudflare who acts as a proxy between the Internet and your servers, so any attack will hit their network and they have enough bandwidth to survive it.