Why do I have to pay taxes on money made on stocks when I did not cash that money but reinvested it?

I use robinhood and made money on stock investments 2019 but I didn't owe money for that? I thought if I cash the money, as in it goes to my bank account, that I need to pay taxes on it. They money has not left my robinhood account...