Honesty speaking, I don't know how to build stamina, but I try to wake up with a get up and go attitude towards my goals because it's something I think I need to do for me and my health and to me that's important. So I guess the first step to building stamina is having the mind set to accomplish the task at hand. Hope this helps
It takes practice in order to have the self-discipline that I have now and one way I do that is by reminding myself what I'm supposed to be doing, why I'm doing it, and how does it affect me in a positive way. Those reminders help me align my goals with my values and give me the determination to achieve and then succeed. Whenever I am in a rut or I fail at a task I just make sure to pick up where I left off instead of using it as an excuse to continue passing on it. Also, I try to reach out for help whenever I need it or have a friend to support me and hold me accountable on my actions.
This is not easy. In the morning I start as soon as possible. I even sleep a bit while making breakfast haha. It means that I don't think too much and I just do my morning routine. Now, after 2 weeks, my body and brain need water, a meal and work when I wake up.
Best way for this is cardio. Start with some light exercise. You can look up a running schedule to build up to more. Start with intervals! If running is not your thing, try: cycling, rowing or swimming. Don't overdo it! Build up carefully and add length when you feel that you can handle it.