Which of the above options is better for the battery if I'm not at the laptop for about 30 minutes and have to go back to the laptop after this time?
If you shut it down, all programs will be closed in the background and your computer will not drain the battery unnecessarily, but if you close the Laptoo it may be that some program updates or something are loaded so I advise you to shut it down