Your best bet is to sell your phone then buy the phone or you
can look to see if they have any trade in offers for the phone you want
but you won't get top dollar on the trade in.
Swappa, which is a third party site, will give you an idea what your device is worth based on what they are currently selling for in similar condition. If you decide to sell your device through them, they do have fees, just like any of these type of sites.
If you choose to trade it in, you will probably get less than half of the going rate on Swappa, if not less than that. Trading it in though is fairly easy when done in a T-Mobile store. If you get your new device from T-Mobile and don't like the offer for the trade in, then get your iPhone on a monthly payment plan, if you are on postpaid, and sell your other device once you have T-Mobile SIM unlock it for the most you can get for it.
Sorry to hear the phone isn't what you wanted. Since you're past the buyer's remorse time, the trade-in offers mentioned above are going to be the best bet. Please let us know if you've looked into those.
Thanks for all the advice everyone. I ordered an iPhone 8 (wanted a SMALL phone) with 256GB from Amazon for $300 (refurbished). This will be my grand experiment to see if I really want to leave Android or not. I really am tired of all the giant phones. If it works out, I'll sell my Pixel on eBay.
Is it a 3a or 3a XL? What specifically do you hate about it?