Invariants are simple constraints that should not be violated for the object to be in a safe state.
An invariant can be simple like a
simple regex check on some string property of a class.
It can be a complex/combined invariant which means two parameters combined make a valid combination. eg. -
A class can hold type of animal and type of sound it produces.
so , a combination of dog and bark is valid but a combination of dog and meow is not valid. (just a case)
For simple cases, a builder can check the invariant itself in the corresponding property method in the builder or even the constructor of the builder if it accepts any such parameter with invariant.
For combined invariants, the check can be done in the constructor of the class which has the builder inside it. Or, the build method of the builder can also do all such combined invariant validation.
I hope this provides some help regarding the concept.