You think you're talking about staying on top of your goals, but you're actually talking about self-esteem.
Fulfilling tasks gives you a socially-understood purpose and a sense of security within your social environment. Failing at them leaves you exposed to other's judgment or your own.
Inspirations and motivations can allow us to dust ourselves off. At least for a while. We retell our minds that it's not over yet, we've not yet failed and can keep moving towards our goals. At least I learned. I'm just not winning ...yet. Growth Mindset.
They are guard rails so that we can correct our behaviour and not lay around feeling humiliated.
However, while internally we can save face, can we do so externally? One might tell themselves they are persevering but to others they might be flailing. You need good marketing. And if it keeps happening perhaps a behavioural compass tuned better to your abilities.
Whatever you might achieve, realise that this is only your self trying to maintain favourable relations with the outside world. The best protection against that being self-respect, respect of others and consciousness of this relation.
It just dawned on me that I probably have theory for this, because I am bad at it in practice.
---
I didn't respond to the question of how to keep going at whatever you're doing, because the practical considerations outside of what I said are basic. To be seen as 'determined' and full of 'grit' simply do one hard day's work and then repeat it continually unabating. And, get a good night's sleep. And, try to be more skilled than your competition. Etc.
Actually there are a few ways to hack motivation. The easiest is to simplify or localise a task, but the deeper and more fundamental way is by internalising 'I do not need a concoction of extrinsic motivations to do things, I will just start now and not stop'. I am not sure how to teach other's how to jump-start that belief, but I suspect you'll be able to work it out.
The honest truth is that it's a bit like 'going through the pain barrier' in that there is no barrier that you'll pass through and no longer feel pain. You'll merely be exposed to the pain of 'motivatedness' enough that you'll learn to live with it. Does that sound bad? Well ...it is. Continual pain is a sure-sign that you're trying to do something that you're not meant to do. I think you'll find that you'd be much happier if you avoided adversity, however the important thing to remember is that you have a choice here.