This is a natural part of life and childhood.
I am not an expert on child development, nor do presume to give any advice on the issue.
As parents, we deal with a lot of poo and wee. That’s just life. The first sign or nappy liberation occurs when your child learns to recognize what they are doing, when they are doing it. Some of them squat down and say poo or wee and go. Next, they learn to control it which is a big step and accordingly, takes a while.
Now, just because they can control it doesn’t mean they are ready to switch to underwear. How will you know? Well, they will state that that’s what they’re doing. Also, some of the toddlers keep a pretty regular schedule and there will be certain times a day you will be able to expect it.
The next stage would be the potty. Some toddlers are resistant. If this is the case no pressure. Maybe they are not ready yet. Start by offering potty time every 1-1.5 hours. If this goes well you can then switch to underwear.
Expect accidents. This will happen as this is a big adjustment. Do not get mad in any way if an accident does happen. Say to your child it’s no big deal and have a dry pair cloths at hand. From now on always have a dry pair of underwear and pants wherever you go.
Accidents happen in the funniest of places, London underground for example. Like all skills this will get better.
The most important peace of advice I can offer is don’t start weaning (I don’t like this word as it implies training) until you think you’re child is ready. It could happen at two years old, or much later. Every child has their own pace. Rushing them will only backfire.