Staying productive is super easy but everyone overcomplicates it
So first you need energy to be able to put it into your work, to increase energy you just need to be physically active(you don't need to do like 1000 pushup, just like 5 minutes of jump rope from time to time can get the blood pumping)
Then you need to focus that energy, people get focus all wrong, it's not prioritizing work over distractions it's being in, it's just as simple as not having anything else to do but the work your trying to accomplish
Most people won't take action on this, so I'd suggest having an accountability partner so that you don't have to rely on "discipline"
for burnout what i do is breaks, but not randomly whenever i feel tired, i have specific time blocks in my schedule for when its time to relax
you may still get a bit of burnout from time to time, for this you just need to have an outside motivator like an accountabilty partner , what i found to really work is to just tell someone you respect and trust that youve been getting no work done, usually the social pressure of "oh damn i just told my friend im not getting much work done, next time i talk to them i dont want them to see that im still in this state", then i get back to work!