At least 24 states have adopted bans on gender-affirming care for minors in recent years, and most of them face legal challenges.