Even at its peak, English language wasn't as widespread as now. The French language was, especially in 18th and 19th century, having substituted Latin.
After WW2, US absolutely dominated the world coming off as the only victor in WW2 (that's my personal opinion) and used their position to place English language as #1 language of the world (over time), undisputed. The end of the cold war cemented this even further.
We can argue that British imperialism helped somewhat, that I agree with.