Lease ends in 4 months and need help as first time lease returner

Need help with my current situation. I am currently leasing a 2020 Hyundai Sonata SEL with Convenience package. My lease ends in July and I am starting now looking at vehicles but the value with my mileage (38k) is worth more compared to my buyout (KBB value of $21k and Buy-Out of $17.3k).

Lease is through HMF USA, Residual value is $16.5k,

Would it make sense to buy out my lease and sell or should I trade in and get another Hyundai. Don’t know if I will get any sort of credit or can negotiate it since there is some value but unsure how to go about that process.

This is my first lease/lease return and any insight/tips would be extremely helpful to me.

You may have more luck selling out the lease directly. 3rd party dealers werent buying hyundai leases for anwhile, but that seems to be easing off. Get a bunch of buyout quotes before taking on the sales tax liability of buying out yourself.

Also risking the offer drops after a month of waiting for paperwork after buying out