It's a metaphor¹. The 'cup'2 represents asking for money and power which is what most everyone in the past has done in this situation; i.e. being owed a wish from a genie.
'Drinking from that cup' would be analogous to doing what most everyone has done in the past.
He's saying 'Everyone asks for money and power. Don't ask for money and power because no matter how much I give you, you won't be satisfied.'
The subtext to that dialogue is that Genie has played out that scenario multiple times and he's sick and tired of watching his 'master' self-destruct as history repeats itself. Those who cannot remember the past are condemned to repeat it. He's warning Aladdin against making the same mistake as previous 'masters'.
¹ Metaphor - A metaphor is a figure of speech that, for rhetorical effect, directly refers to one thing by mentioning another. It may provide clarity or identify hidden similarities between two ideas.
2 'Drinking from cups' has been used as a metaphor since (and may indeed originate from) The Bible