You sold it because you could get more money for it. That’s what greed is - you chose more money. You could make the case that you weren’t behaving immorally -not everything in life has to be a charity- but you acted out of a selfish desire for more money.
I’d also argue that “value it more” is pretty flimsy. Yes in a shortage the buyer clearly needed a car and was willing to spend more to acquire it instead of waiting for prices to drop. But you clearly didn’t value it beyond the 2019 price based on your stated desire to sell then, it was just an inconvenient transaction.