Good fingering habits is one of the core skills in learning to improve as a pianist. Everyone has different hands and one has to find the best fingering for one's own hand. A good teacher can guide you through this. Studying things like fingerings in scores, fingerings by composers (especially ones that may first seem non-intuitive), and videos of pianists. There are also patterns that tend to recur in piano music, to which you may find a common fingering, such as: scales, chords, arpeggios, and figuration like Alberti bass.
Along with fingering also comes the study of one's own hands, and what works best for them. As you gain experience with fingerings that work for you, you can start to apply your own fingerings with a better judgment if it is a good choice for your hands.
Remain flexible in your use of fingerings. As you gain skills at the piano, your technique will open up fingerings that in the past may have seemed awkward. You may opt to switch fingerings in the future to something even more suited to your hands.