Intersex is a term used to describe a person who is born with sexual anatomy or organs that does not typically fall into categories of male or female. In some cases the doctor and the family decide the gender of the baby and perform surgery on the baby to have an assigned sex at birth. However, this is an unnecessary procedure and ethically wrong. Being born as intersex is very normal and has no medical threat. It is up to the individual to decide what medical procedure they would go through.
Sources:
https://isna.org/faq/what_is_intersex/
https://www.verywellmind.com/what-is-intersex-5092841