Pain in your muscles following a workout is known as DOMS – or delayed onset muscle soreness. It is triggered by small-scale damage to your muscles from strenuous or unaccustomed exercise.
Using this as a barometer isn’t sustainable. As you workout more, you’ll stop getting that soreness. Great news!