Once you write any code to solve a problem
The answer really is that simple.
It doesn't matter what programming language you used. Or if you wrote code for mobile phones, a website, or a desktop application.
Even if you wrote the tiniest amount of code, as long as you solved something with code, you are a developer. Any experienced developer knows we spend way more time thinking about how to solve problems than actually writing code.
You don't need to solve hundreds of problems to call yourself a developer either. The first time you write code, you are a developer. Sure, you are a beginner developer, but you aren't any less a developer than anyone else.
Whether you wrote code for yourself or were paid also doesn't matter.
Ignore the trolls that say you aren't a developer if you didn't use X language or work on Y platform. These people are insecure and trying to validate that their work is better than everyone else's. They forget what makes someone a developer.
If you wrote code to solve a problem, go ahead and call yourself a developer.