How can I avoid being sore from working out?

How can I avoid being sore tomorrow after working out for the first time in a while? I worked out today and my legs feel like jello because I did 50 squats (not all at the same time) but last time I did that I was super sore and didn’t wanna workout again for a week.