This question already has an answer here:
I have installed Ubuntu 18.04 in UEFI mode in laptop pc which has Windows installed in legacy mode. Even though the grub menu appears it doesn't work. Each time I have to press f9 to enter the boot menu and select the UEFI file shimx64.uefi to launch Ubuntu. Is there any way to fix this? Like converting the boot mode to legacy? I tried reinstalling Ubuntu; but it automatically installs in UEFI mode.