I believe this comes off the dome light circuit that is used for all the interior lights, and door open etc.

So unless everything else has stopped working as well, I doubt if it's the fuse.

The dome fuse should be in the frunk fuse box.

The lamp holder in the boot is pretty flimsy, and I have had a few problems with poor contact there.

The other possibility is poor contact in the light switch in the boot.

As this just connects to ground

(chassis) when the boot is opened, might be worth checking the switch is making a good contact with the chassis.

Paul