Returning a lost wallet is not sin, but if a person is filled with pride because they returned a wallet, that pride is sin.
This is what Pro 21:4 is speaking about, pride. It says a high look, a proud heart, and the ploughing of the wicked is sin. It is not wrong to plough, the scriptures tell a man to work hard and plough his field, and warn against sloth. But if all a man's labor is to prove to himself he is better than others, then it is sin.
And many folks labor hard to become rich for this very reason, so they can have a huge home, fancy cars, go on expensive vacations, etc... It is an attempt to prove to others thay are better or smarter than them. This is sin, and this is what Prov 21:4 is speaking about.
Now, this man may have obtained his wealth through honest and diligent work, there is nothing sinful about that, but his pride is what is sin. And if he is working hard simply to convince himself he is better than others, that is sin.
But that doesn't mean this same man might do good for good reasons. He might use his wealth to help a poor person out of true love and concern. That would not be sin.
You can't read into scripture, Proverbs 21:4 is specifically dealing with the issue of pride. It is not saying that every single thing a man does is evil. It is not speaking of all men as well, this same proverb speaks of righteous persons.
Pro 21:18 The wicked shall be a ransom for the righteous, and the transgressor for the upright.
Prov 21:4 is not saying all men are wicked. This same proverb contrasts wicked and righteous persons.