It depends on the goal. Mostly I just get over it and reevaluate my next move. Life has a way of changing things, so you have to be somewhat flexible in your goals.
Keep trying.
It is only for the Time Being.
There are always goals to obtain. And there is always a goal just beyond my reach.... But that's okay cuz it keeps me reaching.
When they stop raising the bar.
Like I haven't appropriately SIZED my goals.
There is no reason you cannot achieve a goal, especially if it done incrementally . . . Barring any physical limitation you cannot overcome of course.
Start by sizing you goals small obtainable and something you can claim "Victories" over in a small amount of time. They will inspire you and keep you motivated to keep moving forward to the next appropriately sized goal. Rinse, Repeat.