I would extend this to say that you should give up as fast as possible. I once went from idea to abandonment in <24hrs. Do not give up on the dream, but give up VERY FAST if the small experiments to validate each progressive step of a project fail.
Unpopular opinion: It is absolutely okay for a founder to give up.
If you're 3 years in, 8 pivots deep, barely paid yourself, and your spirit is broken, you've run out of emotional runway.
Go get a job, enjoy life, and come back in a year. You need a reset.