It’s not the same virus. However, viruses do go through periods where they are very virulent and contagious.
That’s where Ebola and the black plague viruses have in common.
Plague isn’t a virus, it’s a bacterium.
At some point when the number of infected people in a area became high enough, the Black Death’s vector changed. It began as an infection from the bite of a flea, but, according to what I remember reading, it later became airborne and infected the lungs as a pnuemonic plague. That’s when it became much more deadly.