It takes just minutes to get pregnant, but 18 years paying for it! (A joke I’m sure you parents would laugh at!)
Maybe you mean why does it take 9 months for a baby to develop in the womb? It seems the larger your brain is, the longer you have to spend in the womb. Some mammals with little brains can spend as little as 2 or 3 weeks in the womb, where as animals with massive brains, such as elephants, take 22 months!