Encouraging someone
Do not give up! is a common way to encourage someone to keep trying when a task is difficult.
Phrasal verb / Give
To stop trying to do something, or to stop doing a particular activity or habit.
The puzzle was difficult, but she refused to give up.
He gave up smoking last year.
Do not give up on your goals after one setback.
Depends on the meaning
Stop trying: use give up on its own: I will not give up.
Stop an activity: use give up + noun or an -ing form: give up smoking. A noun object can also come between the verb and particle: give the habit up. A pronoun goes in the middle: give it up.
Give up on someone or something means to stop believing that they will succeed or improve.
He gave up smoking last year.
He gave up to smoke last year.
Do not give up! is a common way to encourage someone to keep trying when a task is difficult.