The command for this is
M106 S255
Put it where you need it. In firmware you can put it in
#define STARTUP_GCODE ""
so it runs when your printer gets power. Or you put it in the start print gcode. You can also configure slicer to always have fan 100%.
If you need always fan for some reason connect fan to a power socket so it can not be disabled. Slicers add fan commands easily and will disable it normally at end.