Hello Customer,
Welcome and Thank you for posting your query on HP Support Forum
I understand that you are not able to set the Legacy Boot Mode.
Please try to create the BIOS Administrator Password and then try to change the settings.
****Click the Kudos Button on left to say Thanks****
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
Thank You,
K B T 86
Although I am an HP employee, I am speaking for myself and not for HP