I didn't trade in my previous phone, but there is an option for trade-in when you are selecting the version of S23 Ultra you want. If you select it, it lets you find your current phone and gives you the trade-in value if you choose to trade it in.
Best Buy, Samsung's site, and pretty much any site you can buy the S23 on, gives you that option.