Children vary.
There are some who get it earlier, some later. They will all get it eventually (with obvious disclaimers re: health complications and disabilities)
Dd1 trained late (ASD). Her nursery thought they knew better than me, and started training her without my permission. They caused unto,d problems, which actually then made training her longer and harder than it needed to be. She was finally dry in the daytime at around 6, but still had issues with holding poo until she was about 10 or so. Those problems also lasted long past training, and it is only now that she can finally go to the toilet fully on her own - she is 13 later this year. Nurseries with rigid rules are a nightmare, and should stop being so controlling, imo and ime.
Dd2 (also ASD) knew what to do, but suffered with anxiety around the whole thing (possibly due to seeing her sisters problems and issues). She was dry in the day by 3.8, but not dry at night (different kettle of fish entirely, as it's hormone led, not 'learning') until she was 8.
Ds (also ASD) was reluctant to train - he is much younger, and like a pp's child, didn't want to stop being a baby. He also trained late - after3.5, but then just got it, and has literally never had an accident. What clicked for him was wanting to go to school (he is a summer born, so started school soon after his 4th birthday), and I told him he couldn't go to school in pull ups (private school, set their own rules). He resisted for about 3 days after that, then 'decided' all by himself he wanted to wear pants. And has never looked back. He was dry at night at the same time.