Assuming he is buying newly-issued shares from Tesla, then the money goes directly into their treasury. So, the company will have $20MM more in cash than it did the day before.
I'm no finance person, lawyer, or anything like that. But I suspect that he can't just give Tesla money and it has to be in exchange for something, such as stock.
If it's newly issued the price will be dilution of the other shareholders stock. I guess it's a smallest burden on Elon and the rest of the shareholders.