Do children really know when your pregnant?

So today I am 9 dpo, and I got my bfp this morning.
I woke up to my 2 year old son snuggled into my back ( partner was awake so when our son came into our room, put him in our bed) and all day since he has been giving me tight squeeze cuddles and a lot of kisses. He's not normally an affectionate boy, I just wondered if they could know even with how early it is?