Does icloud storage get freed up automatically after 30 days?

Welcome to Ask Different.

iCloud doesn't get cleared after 30 days, or ever (unless done manually). As for saving photos to your mac, that can be done manually from icloud.com. You can also access them from the Photos app on your mac by enabling iCloud Photos Library from System Preferences.