This is an impossible question to answer, as it depends on many different factors, such as your current level of experience, your intelligence and creativity, your work ethic, how much time and money you invest, the niche and strategies you’re implementing, etc…
I’ve seen some people make money online within a month, others several months, and for others even years. It personally took me years before I really started making consistent money online that was sustainable.
Of course you can accelerate the process and increase your chances of success by investing in courses, training or mentors, which is something I always recommend.
Here are the articles and videos that goes more in-depth of how long it takes to make money online.