This as-told-to essay is based on a conversation with Mounika Chinnam, 33, who lives in Andhra Pradesh, India and took a seven-year career break. The following has been edited for length and clarity.

I got my first tech job when I was 23, writing code for a research and development company. I had a postgrad diploma in advanced computing and felt excited to start my career in computer science.

Three years later, in 2019, life was very different. I had left my job shortly after getting married, and given birth to my son prematurely at 32 weeks. As a result, I became a stay-at-home mom.

I felt I could rebuild my career at any age, but my son’s…