Run the third party app EtreCheck and post the complete report here so we can examine it for possible clues. More than likely you have some third party software installed which is causing problems. Other possibilities is file syncing to the cloud.
How to use the Add Text Feature When Posting an EtreCheck Report - Apple Community
Try selecting the Sleep option from the Apple menu. Before you do though, press the Caps Lock key so you when the Caps Lock LED goes out, then you know the laptop went to sleep. Closing the display clamshell lid does not guarantee the laptop will sleep (software may not allow it, or the Lid Angle Sensor may not be bad).
Plug in the laptop whenever you can do so to keep your battery charged. You can also select "Shutdown" from the Apple menu to completely power off the laptop.
Keep in mind that pressing any key or even touching the Trackpad can wake up or power on the laptop.
You can use the following Terminal command to see the sleep & wake events for the current day:
pmset -g log | grep -iE 'Sleep |Wake ' | grep -E "^$(date "+%F")"
If you want to see the sleep & wake events for the overnight hours when you put the laptop to sleep the night before, you can use this command (it will include all events for both days, not just for sleeping the laptop at night):
pmset -g log | grep -iE 'Sleep |Wake ' | grep -E "^$(date "+%F")|^$(date -v -1d "+%F")"
You need to copy & paste the commands since there is very critical spacing involved or it will fail or deliver incorrect results.
The output of the commands will show the battery charge level at each event, and will provide the reason for the sleep & wake events although many of them may be cryptic. There may be a lot of entries shown since Macs tend to wake & sleep a lot overnight.
Edit: I forgot to mention that connecting or disconnecting any external devices can also wake up or power on the laptop. So disconnect them before initiating sleep or power off.