you could try another charger to see if the laptop blue screen when charger is plugged in issue appears.

Step 1: TypeControl PanelinSearchand open it.

Step 2: ClickHardware and Soundand then choosePower Options.

check the option of High Performance

Step 3: ClickShow additional plansand check the option ofHigh Performance.

you’ve got the option to try these steps to fix the laptop BSOD when plugged in.

Step 1: Right-tap on theStarticon to chooseDevice Manager.

choose Search automatically for drivers

Step 2: ExpandDisplay adaptersand right-tap on the graphics driver to chooseUpdate driver.

Step 3: ClickSearch automatically for driversand follow the next on-screen instructions to finish the update.

To reinstall the driver, you could right-tap on it and chooseUninstall unit.

Useful Solutions to Fix No Battery Is Detected in Windows 10

you’ve got the option to uninstall the damaged one and reinstall the new one.

Right-press the listed one and chooseUninstall equipment > Uninstall.

Restarting your PC will reinstall the driver automatically.

It will teach you how to fix this problem in detail.

Update BIOS

The last resort is to update BIOS.

Hope these troubleshooting methods can resolve your concerns.