Trouble with boot loader Fedora

I have tried to install Fedora Workstation 40 using an usb stick with the iso file written, but it always fails writing the boot loader configuration.

I am using an external enclosure with an NVMe ssd. The laptop is Lenovo Yoga 7i 14ITL5.

If the enclosure is directly wired to the usb c port, the installation tool won’t even open. If I hook it up to a dongle with usb c port, then the installer opens and the installation progresses faster and longer, but still struggling with the boot loader.

The drive is formatted in windows as gpt, and the read only attribute has been removed using diskpart.

Is there any fix for this? I cannot properly install Fedora workstation.

Now the downloaded finished with connecting through the dongle. I can boot with the dongle connected and everything works OK. When I try to connect the NVMe enclosure directly to my laptop the OS will not boot. It does not seem to like when the NVMe is directly connected to the laptop, is there any way to make this work?

I am stuck at the boot, and it just loads until I freezes.

After running for about 5 minutes through the dongle, it just crashes with the following errors:

Some laptops are designed to only boot from specific USB ports by hardware design. Some will not even boot from usb and this may be either a bios setting or hard coded into the bios (or hardware)

I suspect the usb C port is not allowed to boot but by checking into the bios settings you may be able to alter that.

The USB C dongle is plugged into to the USB C port. This dongle has an usb c port, and plugging into this does work. The nvme drive does appear in the boot menu, when I select it I can choose to boot into Fedora Workstation 40, but after this, when the fedora logo appears along the lenovo logo, it just never progresses. It just loads for a long time.

I can boot to the live media writer with the nvme plugged in. But connected directly to the laptop I cannot open the installation program. I have to unplug it, then the program opens automatically.

While running the os plugged into the usb c dongle, it worked fine for 5 minutes, until it crashed and displayed the error in the image above.

Is there any way to retrieve boot information when booting into fedora or windows? Like a file with information after booting had finished?