Gender is a made up term coopted for political purposes. Sex is the appropriate word and is determined at conception.
That is an important distinction. Sex is not “assigned or determined at birth.” Sex is determined at conception and for the vast majority of history, revealed at birth.