Question: what is the difference between giving up and having enough?
Answer: In the most literal meaning, as far as I know, “giving up” implies that you've given up on reaching a certain goal. Meanwhile, “knowing when you've had enough” implies that you've stopped doing something with someone/something*. ... You could very well have had enough of trying to reach a goal and so you give up.