Hi , TheCableGuy96
I am Ivan, I will help you with this.
Use the search bar to search and open Control Panel;
On the panel, click on “Hardware and Sound”;
Look for the “Power Options” tab and click on “Change how power buttons work”;
Then change the settings for when to close the lid while the laptop is on battery or plugged in.
Check “Nothing to do” so that the computer does not turn off in these cases.
After that, you have to set the screen to extend mode when you close the lid, use Windows key + P and select the Second screen only option.
Independent Advisor - Community
Thanks