Firstly, I think too many people get caught up in the word "change", meaning, "from option 1 to option 2". But change is a spectrum, and so is sex. Change just means.... change - to become different from what you were.
Secondly, sex can be defined and thought of in different ways in different contexts. Here, I'm thinking of sex primarily in a medical sense, which considers all features of dimorphic sex across the body beyond just gametes, and is the most important to us as individuals living our lives. Reproductive capacity is still a foundational component of sex in this definition of course, but as you'll see, even that can be "changed".
In this lens these are the main elements of sex that come to mind: chromosomes, gametes, endocrine system, primary sex characteristics, secondary sex characteristics. Many people will have all of them aligned towards either "male" or "female". But others may have a few traits that lean towards the opposite end, placing them a bit closer towards the center of the spectrum. Some fewer others will have a very diverse mix of traits of both, or even some that align with neither.
This is a perfectly valid way of considering/understanding biological sex - considering sex to be solely related to gametes or chromosomes is sort of reasonable in some specific contexts, but in other contexts it is pretty much useless. And even in those specific contexts, the other elements of sex still may come into play.
Naturally, it follows that medical intervention can change many of these features, mainly the last 3 I listed out of 5:
Your endocrine system and the primary sex hormone you have determines the vast majority of biological differences between the sexes. For example, after being on HRT for a while, your doctor will begin to consider your metrics of health relative to that of your identified sex instead. And your primary sex hormones determine your secondary sex traits, and can also change your primary sex traits somewhat (i.e., bottom growth in trans men, changing the clitoris to resemble its anatomical homologue). Primary sex traits can be changed more radically through surgery.
Gamete production can't be swapped to the opposite end of the spectrum, but it can be removed entirely, placing you right in the middle of the spectrum. Chromosomes are the only literal unchangeable thing, and only have some relevance in that you might be more predisposed to very specific diseases or conditions or whatnot depending on the ones you've got. Your genetic activity can even change, through epigenetics, even if your chromosomes themselves can't change structure.
So when I say "you can change your sex", I'm not saying "you can flip flop from (a simplistic view of) one black and white sex to the other". I'm saying that you can change your biological sex to varying degrees in varying ways, because change is not binary, it is a spectrum that can have many different outcomes.
Further, using "biological man/woman" or "biological male/female" terminology and the like to differentiate cis people from all trans men/women is silly. Medical transition is a biological process involving many elements of your sex, and it does change your body and how it functions. Your body can become more male/female in many ways, even if you weren't born that way, even if you can't change everything.
ETA: I have a very hard time believing this is not a 10th dentist take, but I will be very pleased if that's the case lol. At least on this sub.. I know for a fact it's a 10th dentist take generally speaking, unfortunately.