Nvidia driver failed to install, cant go to the desktop again - Fedora40

When I try to install the Nvidia drivers with the dot run file I get this error “Failed to install the kernel module through dkms” and it won’t let me go back to the graphic desktop, I am very new to linux so detailed instructions would be appreciated, thank you very much for your attention.

Remove the driver with the .run file then install the driver as shown at

You probably don’t have all the prerequisites installed.

Also sounds like you have Secure Boot enabled.
Follow this guide to install the driver.