I am planning to invest in an external 144 Hz display for smooth game developments, now as far as I know macOS outputs video at 60 Hz so if I buy an 144 Hz external display will my MacBook be able to output video/operate at 144 Hz screen refresh rate?
Yes, it should work out of the box given the right cable and a new enough MacBook (some MacBooks will need a 3rd party patch.) If you're still having issues (which you shouldn't), you can try using SwitchResX to force the monitor to work at the correct settings.
However, you indicated that screen tearing was the issue you wanted to solve. Faster refresh rates won't solve screen tearing, only Vsync (which hurts performance), FreeSync (which requires an AMD card, specialized monitor, and Linux/Windows) or Gsync (which requires an Nvidia card, and more expensive specialized monitors.)