The ordinary *.py files are automatically compiled into *.pyc files by FreeCAD. Those binary files are checked at every load to see if they still match the text-based *.py source files. If so, the existing *.pyc files are used. If not, new compilations are performed.
It all works automatically.
Just for completeness, there are a few *.pyd files that are created only during a full C++, Cmake, etc, build. You generally do not need to worry about those.
I believe it is also possible to reload some Python files even without restarting FreeCAD, but I am not sure this is universal. I always restart.
Gene