Hi CristinaSantoro,
Thank you for reaching Microsoft Community.
Please go to Control Panel > Hardware and Sound > Power Options. Select Choose what the power buttons do on the left side. Change the dropdown for When I press the power button to Sleep under both On battery and Plugged in. Click Save changes.
Hope this helps.
Kind regards,
Marrion