My brand new MacBook Book Pro dies at 30% with no warning
Firstly, how long your MacBook Pro will last on a charge will depend on a number of factors, including what you're using it for at the time. Most people most of the time will not achieve 10hrs in between charges. Sometimes you will, and sometimes you'll even exceed 10hrs, but usually you'll fall short of that.

However, it also shouldn't just die at 30%, so I would reset the System Management Controller (SMC).

Resetting the SMC on a MacBook Pro (2018 or 2019 models)

NOTE: If your MBP is not a 2018 or 2019 model with the T2 chip, please let me know so these steps can be amended.


Fully shut down your MBP. 
Press and hold the power button for at least 10 seconds
Let go of the power button and wait 5 seconds
Power up your MBP again


Once you've reset the SMC fully charge your MBP and see how you go. If it's still misbehaving, reset the SMC again but with the following steps instead:


Fully shut down your MBP. 
Press and hold the right shift key and the left option and control keys for 7 seconds before then also pressing and holding the power button (or Touch ID button) down for another 7 seconds (i.e. the keys will end up being held down for 14 seconds, the power button for 7 seconds)
Let go of all three keys and the power button
Wait 5 seconds
Power up your MBP again


Now test your MBP again.