Digital Marketing is a domain, which is focused on Marketing products and services, using digital platforms. Whereas, e-commerce is all about buying and selling products or other online service using the internet. These products could be B2B or B2C or even consumer to consumer. E-Commerce uses the Internet and Digital Marketing uses the Internet and other digital platforms. If you have a product or service, that you have designed or produced, you could sell that using popular E-Commerce website, and could advertise using Digital Marketing practices that could help you to reach users, on various platforms like social media platforms, through emails, etc. to drive in more awareness.
If you wish to learn Digital Marketing, I would highly recommend you to check out the Digital Marketing certification course, from Intellipaat. Also, check out our YouTube video on the Digital Marketing course from our experts and get yourself started.