Yes but no.
For you lot mostly in the UK and not US-based like myself, this could hypothetically be achieved with what is called an Executive Order.
It's a declaration of an action to take that bypasses the legislative process entirely. It has to hold up to review process and judicial scrutiny, but someone would have to actually challenge the order. In one sense, it can allow a President (the only person able to issue Executive Orders, as head of the Executive branch) to act quickly and decisively on a sudden emergency for action that otherwise could be delayed (or unlikely or impossible entirely) through the formal Legislative process---responding to natural disasters, declaring war (which historically is supposed to be declared through an Act of Congress), war material production, etc. In other instances, Orders have been reflective of reactionary sociopolitical fears in their historical context, such as banning Communists and LBGQ from federal employment. Positive (such as the Emancipation Proclamation) or Negative (interning Japanese-Americans involuntarily during WWII).
Many states already seem to have some sort of law prohibiting "biological men from competing in women's sports." But, for like school age scholastic sports. Individual adult age sporting federation seem to make their own rules which vary from organization and sport.
He can claim all he wants that he would "ban" such persons participating in sports generally. Not sure how successful he could be with such an initiative (for adult age sports, at least). One topic that theoretically the GOP believes strongly in, so called "State's Rights" to choose their own laws also conflicts with an apparent nationwide ban to form a contradiction. But a politician, or a political party, appearing contradictory isn't really news. In reality, one good guess is that it's simply something he can claim now he'd do once his hypothetical second term started, but like many politicians promises more than he could do just to secure voters. Such a ban through an actual legislative act of Congress would realistically just never happen due to the current close/even spread for both parties in both houses of Congress. It's a non starter, but representatives nevertheless will try to get such bills to the floor (even if they're doomed to fail, through no final vote or heavy defeat likely) just to showcase they are "doing what's right" (for whatever political purpose or side) and can use behwbior such to reinforce their re-election credentials to motivated partisan constituents.
This thread is overall a dumpster fire I try to avoid looking at and I otherwise don't have much to contribute (opinions of politics, that is), but as an educated Historian heavily studied in American history theses types of topics are still interesting and I'm happy to give context or information for anyone in UK or anyone otherwise not familiar with American politics or history.
Some links:
These directives, which carry the force of law, altered the course of history and changed the fabric of American life.
www.history.com
en.m.wikipedia.org