When Jesus told us not to pray or do good deeds or fast to be seen by others he was instructing us to avoid being hypocrites; but he was telling us something else, and if we don’t see what that is we are missing the point.
Of course Jesus does not want us to be hypocrites. They are obnoxious.
But his reason for our not making a public display of our good works is that pleasing the Father, and growing in intimacy with him, is the best use we can make of our time.
Growing in intimacy with the Father is a two-way street. For the meager measure of pleasure our love could gives him, a torrent of love comes back to us.
Day in and day out our main endeavor should be one of growing in intimacy with the Father.