I'll reiterate what others have said: first learn triads, major, minor and diminished. Then move on to the diatonic seventh chords: major, minor, dominant, half-diminished, and fully diminished. Extending the seventh chord set with ninth chords and the French augmented sixth (dominant seventh flat five chord) would be the next logical step.
Starting with a base of triads, it should be noted on piano there are only 6 chord "shapes" for major/minor triads. Several shapes repeat like
When moving on to the other chords it's good to think in terms of modifications and additions to major and minor chords and learning a few principles about the black/white piano keys for specific intervals. For example, minor and dominant seventh chords are formed simply by adding a minor seventh to either a minor or major triad. All minor seventh will be same key color except those involving
EF. You can look for key color patterns in the same way for other intervals.
The point is to start with a relatively small base of triads where you think of the chord as a single unit. But when that base is established you should start to think in terms of intervals. The base triads are practical, but limited. Learning all intervals in all positions on the keyboard provides for the full range of chords.
All intervals in all positions is basically 12 intervals times 12 roots, or 144 specific intervals. That brings us back to a large number of things to learn. I think the way to deal with this effectively is to learn chord movements rather than discrete chords. Two chord progressions like
V6/5 I or three chord progressions like
ii7 bII7 I sequenced up/down by step covers practical chord changes and technical coverage of the whole keyboard. It's also a good way to learn chord inversions by putting them in their usual musical context. You can systematically "rotate" through inversions, like this
If you play cadential progressions, things like the classical cadences and the jazz progressions
ii V I in major and minor, and also with the alternative tritone substitutions, which is somewhere around a dozen progressions, and then sequence them up/down by steps, you will develop the basis for playing automatically lots and lots of chords and the flexibility to move beyond rote memorization of everything.