maybe that too, but mainly it was the move from desktops to smartphones and tablets, which Flash was (at minimum) not very suited for if it was supported at all
This may be the only good thing caused by the existence of iOS: https://en.wikipedia.org/wiki/Thoughts_on_Flash