Laptop monitor not being detected. Boot to black screen

I have an HP Omen laptop dual boot Win 10 and Ubuntu. After installation, everything was ok but after the upgrade, the laptop boots to a black screen. However connecting to an external monitor, I saw that the system was loading fine. I am quite new to Ubuntu but after checking for some recommendations online, I figured out that the issue was with the Nvidia graphics card since when I switched to Intel, laptop monitor works but not the external monitor.

Have you updated the drivers for the new nvidia gpu?

Yes, all the drivers are updated. I have booted using the advanced options, using a different kernel and using nomodeset in the grub options, the monitor switches on, but I cannot connect to another monitor and nvidia-smi tells me it fails since the drivers are not loaded but at least the laptop monitor switches on.

Please disable secure boot in BIOS security and check.

Secure Boot already disabled. I was able to boot with laptop screen using Advanced options with kernel 5,8,0-43-generic but nvidia-smi says the driver was not initialised and I am not able to connect to external monitor but at least I am able to use the laptop monitor.