grub2: cannot start without USB after making modifications to grub to start from usb

I was able to install Linux mint from usb after making these modifications to boot from usb:

insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root (insert your uuid here)
chainloader /your/efi/boot/file
boot

But now, if I start without the usb, the computer gets stuck in the restart cycle. I ran the boot repair from the usb but that didn't solve anything.
Here is the output of my boot repair

I was able to boot into Linux mint that I installed by running the same commands but with the uuid of my sda1 and the path given at the bottom of my boot repair, but when rebooting my computer without the usb I entered the same loop reboot as before. How can i fix this?

Edit: I'm not sure if this is useful, but the usb appears last in the boot order given by efibootmgr.