Hi there,
If Windows 10 was installed in Legacy BIOS mode, then your hard drive has a partition style of MBR, if you change to UEFI, then that only works with a partition style of GPT. Back up all your personal files, then clean install Windows 10 from a bootable USB in UEFI Mode and then enable TPM and check if you can enable the secure boot.
If the PC does not allow you to enable Secure Boot, try resetting the BIOS back to the factory settings
https://answers.microsoft.com/en-us/windows/forum/all/secure-boot-option-grayed-out-in-bios-in-hp-laptop/dac33bb3-052c-402f-ad5c-b5c9f10a6136
If the reply is helpful, please Upvote and Accept it as an answer