From what I have read, there are two competing theories about the end (by late 1920) of the 1918 flu: it mutated into a less menacing strain (one that is still present to this day); doctors worked out how to treat the pneumonia that the virus caused and that killed most of the victims.
Whilst some experts are saying coronavirus COULD mutate into something milder, I haven't read anyone who says that is inevitable (i.e., it is what virus' always do) and is a solution we should bank on.
There were less than 2 billion people in the entire world in 1918; so to the extent that herd immunity may also have contributed to the end of the pandemic it was much more quickly reached I imagine.
Although the cases are few and rarely result in death (because today's doctors know how to treat it), the bubonic plague is still with us, particularly in the south west of the United States:
“Bubonic plague in the U.S. is not the same scenario as the historical Black Death," one expert said.
www.nbcnews.com