It may be better to buy an unlocked iPhone 17 rather than going through T-Mobile or Verizon.

Boost Mobile, T-Mobile, and Verizon users should purchase their iPhone 17 from Apple.
This policy affects T-Mobile, Verizon, and Boost Mobile. If you purchase an AT&T-locked iPhone 17 directly from Apple, it will still be locked to AT&T.
T-Mobile and Verizon have different promotions for the iPhone 17, which usually require trading in an older phone and committing to a two-year payment plan to get the most savings.
The FCC is seeking to change the policy where an iPhone 17 purchased from T-Mobile, Verizon, or Boost Mobile stays locked to their network until fully paid off. The FCC aims to give consumers more freedom to choose providers offering better deals.
AT&T is offering the iPhone 17 Pro for as low as $0.00 per month with an eligible trade-in in any condition and a qualifying plan. This offer applies to both new and existing customers.
AT&T is offering the iPhone 17 Pro Max for $2.78 per month, a discount of 92% from the original $33.34 monthly price. This requires trading in an eligible iPhone (any condition) and either starting a new line or upgrading an existing one on a qualifying AT&T plan, saving up to $1,100 after 36 months.
With an eligible iPhone trade-in (any condition) and a qualifying plan, AT&T is offering the iPhone 17 for $0.00 per month.
AT&T is offering the iPhone Air for $4.73 per month with an eligible iPhone trade-in (any year) and a qualifying plan. Shipping begins on September 19.
T-Mobile customers may benefit most from ordering through Apple, as Verizon locks phones for 60 days, while T-Mobile restricts them for up to 365 days. T-Mobile changed its policy last year to penalize early phone payoffs, so purchasing an unlocked phone offers more freedom.
Contact a customer care representative to understand the full terms and conditions to make an informed decision.
"Iconic Phones: Revolution at Your Fingertips" is a book that has been in the works for over a year. It covers the stories of over 20 popular phones and is a journey through the technological revolution.