The reason why it is better to benefit only oneself as opposed to only others should be clear from the following sutta:
And how does a person practice to benefit themselves, but not others? Itâs when a person practices to remove their own greed, hate, and delusion, but doesnât encourage others to do the same. Thatâs how a person practices to benefit themselves, but not others.
And how does a person practice to benefit others, but not themselves? Itâs when a person doesnât practice to remove their own greed, hate, and delusion, but encourages others to remove theirs. Thatâs how a person practices to benefit others, but not themselves.
And how does a person practice to benefit neither themselves nor others? Itâs when a person doesnât practice to remove their own greed, hate, and delusion, nor do they encourage others to remove theirs. Thatâs how a person practices to benefit neither themselves nor others.
And how does a person practice to benefit both themselves and others? Itâs when a person practices to remove their own greed, hate, and delusion, and encourages others to remove theirs. Thatâs how a person practices to benefit both themselves and others. These are the four people found in the world.â - AN 4.96
Who is the superior person, the drunk guy under the bridge telling teenagers they shouldnât drink, or the guy in Alcoholics Anonymous minding his own business?
So practicing to benefit oneself but not others does not mean buying yourself a Maserati instead of donating to charity and buying a used Prius. Skipping the sports car and giving generously helps those in need (at least materially speaking), purifies your own mind, and builds up treasure in heaven (aka good kamma). In fact, being generous but not encouraging others to do so would fall under the category of benefitting oneself but not others from a dhamma perspective.