The manual has instructions on how to pop the frunk when the 12V battery is dead:
Model Y Owner's Manual | Tesla
As does the DIY Guides:
Model Y Do It Yourself | Tesla
For most people, it's a simple matter of calling Tesla Roadside or AAA and they can send someone with a jump starter to pop the frunk and jump start the car.
If you want to prepare for a situation with no outside help, you can stash a small 12V A23 battery in a small zip lock bag (to prevent corrosion) behind your tow hook cover. That can be used to pop the frunk in case the 12V dies. You can have instructions in there too if it fits. Then leave your jump starter in your frunk instead of trunk.