thing is, of course he can understand the no, but he is too little to act on it, and it doesn't stop him wanting it.
I have a couple of suggestions (none of which might work!)
Change to other words, so he wants a biscuit but it is nearly lunch time, instead of saying no, say 'later' and then immediately distract, ''yes, we will have biscuits later, now it is time to play with the cars''
use no with a short (very short explanation) eg, no, we don't hit, it's not kind, then immediately distract as above. But this isn't ''telling off'' it is the beginning of teaching, so with a normal voice, not a ''telling off'' voice
Try to offer alternatives, well, we can't get out of the car, but we can put some music on.
last one is to make a game out of whining (he may be too young for this) Mummy like to hear a nice voice, not a whiney voice, can you do a nice voice and then huge claps and cheers when he does.