Answer what they ask, when they ask it.
“Where do babies come from?” “Babies come out of mommies.”
Have a conversation, not The Sex Talk. Let them lead it. Answer all their questions accurately, with the level of detail they’re asking for. Be matter-of-fact.
Treat it as any other conversation about how the world works.
“How do cars work?” “They have a motor inside that uses electricity or gasoline to make it spin.”
Make sure you can actually explain it - what a cell is, how a cell comes from mommy and daddy and they join and start growing, etc.
If you’re really worried, practice with a spouse or friend who has experience with two year olds. They’ll help you keep the conversation interesting, informative, and non-stressful for both you and the kid.
Again, answer what the kid is actually asking. That means listening, and letting them ask lots of short questions, and giving short answers.
Remember that the kid is not freaked out about sex the way many adults are. They’re likely to have a specific thing they’re curious about, which likely has nothing to do with the mechanics of sex, and as soon as that’s answered, they’ll be done with the conversation for a while.