The recommended place to legally obtain HoMM is on Good Old Games. Avoid the "HD edition" of HoMM 3 on Steam.
HoMM 3
https://sites.google.com/site/heroes3hd/
HoMM3 HD - a non-official fan made addon (multifunction patch) for Heroes of Might and Magic 3. Initially, the addon was created to change the original game resolution 800x600 to a bigger but now it has even more features.
https://vcmi.eu/
VCMI is an open-source engine for Heroes III, offering new and extended possibilities.
https://h3hota.com/en/download
Horn of the Abyss (HotA) is a global add-on for Heroes of Might and Magic III that extends (and fixes if needed) classical gameplay elements and adds some of its own. HotA adds three new towns to the game, a number of new artifacts, neutral creatures and objects, as well as new campaigns and maps.
HoMM 2
https://github.com/ihhub/fheroes2
fheroes2 is a recreation of the Heroes of Might and Magic II game engine. This open source multiplatform project, written from scratch, is designed to reproduce the original game with significant improvements in gameplay, graphics and logic
HoMM 4
https://www.moddb.com/games/heroes-of-might-and-magic-iv/downloads/hommiv-wrapper-v129-english
The magnificent wrapper that fixes the black starting screen, no movies being displayed, CTDs, and warped resolution ratios, plus many other issues related to graphics on newer Windows OSes. Also includes several graphic upscalers.
King's Bounty
https://sourceforge.net/p/openkb/wiki/InspiredGames/
Post any additions you'd want to see in the comments.