Gender on ultrasounds

K • 33 yr old, married, one baby girl.

At how many weeks can they predict gender by looking at the ultrasound? We lost a twin during this pregnancy so I’ve heard I can’t rely on NIPT for gender so I have to wait the old fashioned way and do it via ultrasound. Just wondering how long I have to wait!? Thanks!