When your 2 year old stiffens up it could be a result of hypertonia which is a condition, that is also called stiff baby syndrome and involves persistent muscle stiffness that limits the baby or toddlers movement and could be a sign of an underlying illness.
A 2 year old that stiffens up can also be due to discomfort or gas such as after eating and could be a result of digestive issues.
In more severe cases the 2 year old stiffening up could possibly be neurological conditions like meningitis, stroke, brain tumors or even cerebral palsy.
Infantile spasms also are another thing that can cause babies to stiffen up which is a brief, sudden and repeated muscle contraction and they often also involve head bobs or body crunching and require prompt medical attention.
Other less serious reasons for a 2 year old to stiffen up are that they are excited about something or are resisting something.
If the stiffness in the 2 year old is persistent or there are also other symptoms then it could indicate infantile spasms or hypertonia which require medical attention.
Toddlers and babies also stiffen their bodies in some cases when they are trying to resist something they don't want to do or when they are excited about something such as being placed in a car seat.
And as babies grow they also develop muscle tone and can appear stiff as they explore and adjust to their new abilities.
In some cases it's normal for a 2 year old to stiffen up or tense up but in other cases it might be an issue where they should see a doctor.