There are two kinds of quitting:
Strategic and tactical.
Strategic quitting is changing your dream/mission. That’s bad.
Tactical quitting is changing how you get to your dream/mission. That not so bad.
Never give up on the mission, but if your current plans aren’t working, give up quick and move on quickly to something that is working, and that will take you close to your dream.
Strategic quitting will get you nowhere.
Tactical quitting will get you to where you’re going.