Yes, you can make money through Digital Marketing. The duration of time depends upon your individual efforts and commitment.
If all goes according to plan, you could begin making a respectable income 1.5 to 2 years after finishing your digital marketing course or training.
Pro-Tip: In the first one to two years, focus on applying the knowledge you will learn from the course or training to real-world marketing operations.
Here's related information that you may find helpful - Beginner’s Digital Marketing - 33 Most Frequently Asked Questions (FAQs) And Their Answers To Start Confidently.