Hi Anonymous_132,
I'm Rodrigo and I'll help you.
Open the Start Menu type Power and select "Edit Power Plan".
On the left side, select "Choose what closing the lid does" and set it to "Do nothing". You can set the time before the laptop sleep, or set it to "Never".
Keep in mind that is not good to keep the laptop computer in a backpack/bag while it is on, it can overheat the device, it needs to dissipate the heat.