EV Tax Credit and Capital Gains

I am planning to buy an EV that qualifies for the EV Tax Credit of 7,500. This year, I sold a rental property and have capital gains. Capital gains tax amount will be around 15K. I am checking if there is a benefit  if I make the EV purchase before the end of 2023. 

Can I use the EV credit to lower my tax payment overall?

TY