Often these two forms of education are identified, but this is not the case. Let's figure it out ...
Online learning is live learning through various platforms like Zoom, Microsoft Teams, Discord, etc.
You connect on a schedule and in real time and communicate with the teacher, classmates, just as if you were in the same class. In most cases, these lectures are recorded, and you can review them at a convenient time if necessary.
This type of training also involves working in groups, both during the lesson and when doing homework for group projects.
Well, and most importantly, you can always share your ideas or clarify an incomprehensible question - in general, everything is as in ordinary lessons.
Distance learning is mostly self-study. which is closer to correspondence. In other words, you study the program on your own and submit your work on time.
At the moment, a lot of lecture notes have appeared, that is, you learn not only from the 'printed' material (books). However, here it should be noted that this will be exactly the recording of the lecture and you will not be able to discuss the topic or clarify the question.
In distance learning, there is often an e-mail connection with a teacher, but this is not a regular or frequent communication.
Most of your classmates not only do not see, but you do not even know whether you are studying on this program 5 people or 150
Distance learning requires more self-discipline and is less interactive.