Hi Amer
I work for a University in the UK and we purchase a lot of the HP Zbook Firefly 15 G7.
I've had a few of the Zbooks which either freeze or shut down randomly.
I've updated to the latest version of the UEFI diagnostics software from the HP driver downloads website and then run a full diagnostics scan in bios but it never finds any issues. I then contact HP Technical support by phone and they've always suggested performing a factory reset and updating the bios to the latest version and updating the HP drivers via the HP Support Assistant program. This doesn't seem to resolve the issue so then HP send an engineer to campus to replace the motherboard, that normally resolves the issues for the freezing / closing down issues that i've come across for our Zbook Fireflies.
If you've encrypted the hard drive of your laptop using Microsoft Bit locker encryption, don't forget to take a copy of your recovery key before the motherboard is replaced.