The hobby learners who stick with a language for ten or twenty years almost never talk about motivation. Ask one how they keep going and they shrug. "It's just what I do. I read the news in German every morning. I don't really think about it." Meanwhile the people who quit after six months are the ones constantly trying to pep-talk themselves into another study session.
That gap is the whole game.
Motivation is downstream of enjoyment. When the daily practice itself feels good, you stop noticing you're "studying." When it feels like homework, no amount of willpower will save you long term.
A lot of apps have trained us to think of language learning as a discipline problem. Hit the streak. Don't break the chain. Push through the days you don't feel like it. This works for about three months for most people. Then one day you stop opening the app, and you feel guilty about it for the next year.
The deeper problem is that discipline is a finite resource, and you are paying it forever. Every day you don't want to do the lesson, you spend a chunk of your daily willpower to do it anyway. That tax compounds. Eventually you run out and quit, and then you blame yourself for not being disciplined enough.
The people who actually become fluent over a decade or two are not paying that tax. They restructured their language exposure so the language itself is the reward, not the obstacle standing between them and the reward.

When someone says "it just became a habit," what they really mean is that they found a version of the practice they enjoyed enough that not doing it would feel weirder than doing it. The German guy who reads magazines for an hour every morning is not disciplined. He is reading something he likes, in a language that happens to require a bit of effort.
This is a totally different posture from "I need to do 20 minutes of Anki today." One is a hobby. The other is a chore wearing a hobby costume.
The question to ask yourself is not "how do I get more motivated?" It is "what version of practice would I still do on a bad day?" For some people it is reading manga. For others it is watching dramas late at night. For a lot of people, it is talking to one specific person they actually like.
There is a reason people who marry into a language stay fluent for the rest of their lives, and people who took a language in college forget it within a decade. Conversation has a built-in reward system that no flashcard app can replicate.
When you talk to someone you genuinely enjoy talking to, you are getting:
That last one is the killer. You will not flake on a person you like. You will flake on a flashcard deck every single time.

So here is the move. Stop thinking of language learning as a study problem. Start thinking of it as a friendship problem.
Find one or two people who speak your target language and who you genuinely click with. Not a teacher. Not a paid tutor. A friend. Someone you would want to hang out with even if neither of you was learning anything from the other. The language part becomes background noise. You are just keeping in touch with someone you like, who happens to live somewhere else.
After a year of this, you will have absorbed more of the language than three years of textbook work. After five years, you will be fluent and you will not be able to point at the exact moment it happened.
The trick is not motivation. The trick is making your daily practice be literally just talking to a friend, and letting the language come along for the ride.
Most learners never get to this stage because finding that one good language partner is genuinely hard. A lot of language exchange apps are either dating apps in disguise or so full of bots and ghost accounts that you give up before you ever find a real connection.
The bar should not be "anyone who speaks the language." The bar should be "someone I would want as a friend even if they didn't." Most people skip this filter, end up with a partner they have nothing in common with, and wonder why the exchange fizzles out after two weeks.

SewaYou is a map-based app for finding people near you who actually want to be friends. Not date. Not network. Friends. You see who is nearby, what they are into, and what language they speak natively or are trying to learn.
The map-based part matters because it filters for people you could actually meet up with someday. Pen pal energy is fine but in-person beats it every time, and "we live in the same city" raises the floor on every interaction you ever have.
If you have been trying to motivate yourself through another month of Duolingo streaks, try this instead. Find one person you would genuinely enjoy talking to. Talk to them every day. You will not need to think about motivation again.