Why do toddlers say no to everything?
Because "no" is the first tool a toddler has for asserting that they are a separate person with their own preferences — and discovering that is the central developmental task of that age.
Somewhere around 18 months to three years, children work out that they are an individual whose wants can differ from yours. This is a genuine cognitive milestone, and testing it is how they confirm it. Saying no produces an immediate, reliable, visible effect on the adults around them. That is powerful for someone who controls almost nothing else about their day.
Several other things are happening at once:
Language outruns comprehension in one direction and lags in the other. "No" is easy to say and covers an enormous range of meanings — I don't want to, I'm not ready, I want to choose, I don't understand, I'm tired. Children often say no to things they actually want, simply because it is the available word.
Transitions are hard. A large share of refusals are about stopping what they are doing rather than about the new activity.
The brain regions handling impulse control and flexible thinking are barely developed. Complying requires overriding an impulse, and that machinery is years from finished.
What tends to help: offer limited real choices — "the red cup or the blue cup" — so autonomy is satisfied within boundaries you can accept. Give warning before transitions. Avoid framing genuine requirements as questions, since "shall we put your coat on?" invites the answer you do not want. Reduce the number of things that are negotiable so the ones that matter carry weight.
It passes. This is not defiance in the adult sense, and responding to it as a character problem tends to escalate it.