Probably because you're using two sims. One eSim and a regular one. Currently there is a limitation to LTE instead of 5G in that case. Apple wants to update that later. See separate thread in the forums.
Another reason for that. If you are not on dual SIM card, it means you probably have SIM card that supports LTE/4G looks like orange card. What you need is white SIM card that supports 5G at AT&T store. It did happen to me before.