Two distinct uses: (1) eureka exclamation when an idea or solution finally lands; (2) euphemism for pregnancy (short for 有了孩子). Tone and context — usually 她/媳妇 + 有了 — disambiguate.
register
Conversational. The pregnancy sense is gentler and more intimate than 怀孕 (huáiyùn), which is the neutral medical term.