I found the following in the owner's manual:
The parking brake automatically engages when you
shift Model Y into Park, and releases when you shift into
any other gear.
If the parking brake experiences an
electrical issue, the amber parking brake
indicator lights up and a fault message
displays at the top of the touchscreen.