I was going to say that Serena has to be considered separately because she's a woman and actually had to carry the baby and have her body change as a result; that she was already getting out of shape and then being pregnant and having the baby made the road back to fitness harder. But the timeline doesn't completely support what I thought was the link between pregnancy and decline.
Serena won AO 2017 while pregnant, and then missed the rest of the year. When she came back, she was never in the same shape as the peak of her career, but even before her daughter was born, she wasn't in her 2000s peak shape. When she returns in 2018, she's struggling at first - remember how big she was at FO 2018. But the remainder of 2018 and 2019 she makes four Slam finals. While she's not peak Serena, if she's making 4 Slam finals, I'm not sure we can pin "decline" THAT much on having a baby, though we also shouldn't say it didn't have ANY effect. She really did have ADDITIONAL extra weight and body changes to deal with even if you note that she had time being in less than optimal shape before the baby.
Her greater decline started after the 2018-19 period, even though she made a Slam SF as late as 2021. While she made some progress with her fitness at times, Serena seemingly never made a last-gasp all-out gonzo fitness attempt after the baby to get in absolute tip-top shape for her age. And then, of course, she reaches her late 30s and there's foundational decline that would have existed even if she never had a baby.