What do you do when you're burnt out?

Normally, What I've been doing normally when I was burnt out was to take up a freelancing project. 
Since burnout are basically caused from not getting any win for a long time, and I was working on some hard tech projects, Working on freelancing projects was a sure way to succeed with building a project, and I also got paid for it, so that was double gratification.  
Recently, I've been feeling burned out again, and was thinking about taking up another freelancing project, and am wondering what do you normally do to deal with burnouts?

In case of burnout, I would just play Bandura Instrument for hours. Try to find a good hobby/learn an instrument besides your job?

Also, some people recommend meditating. (maybe because it helps to figure things out and make the mind feel "clean").

But if you are failing constantly, try to understand what goes wrong. Failures are there to teach. (Example: you don't see an outcome, try to analyze what you should do to make it, what stops you, etc)

(Note: I'm not very good at life advice for now, but that's how I see the answer to your question)

I identify areas, situations, & people in my life or work that cause burnout. Plus, I give myself an audit. Are my expectations or timeline realistic and achievable?

Then I try to change one thing (e.g., habit, environment, boundaries). This action alone is a 30-day trial-and-error experiment.

Other things you can do is:
- ask for help (this is hard for me)
- get an accountability buddy
- join a mastermind
- replace a bad habit with a small goal
- give yourself a purpose
- communicate more (this is hard for me, esp after things have festered)

I interviewed other developers & founders to help me communicate and ask for help. These chats made me more aware of myself and extra resources.

Now I'm surveying developers about their strategies and tools for avoiding/managing burnout. My goal is to share the State Of Devs report on Jan/Feb.

Build Some Deliberate Slack into Your Schedule.

Punctuated Strategic Pause will allow your mind to relax and internalize what you have learned, both good and bad. It's an appointment with yourself to reflect. And you are giving yourself a chance to understand the root cause of burnout and make better choices to address them at the moment.

In the next restart, include this approach. You will see the differences.

I have learned this from the LinkedIn leadership course, and shown me the results.