The best way to understand it is to forget the idea that it was an overnight "collapse": the Western Roman Empire disintegrated slowly over centuries, it didn't collapse all at once. What happened is that several factors converged and fed into each other. The barbarian invasions (Visigoths, Vandals, Ostrogoths) aren't the main cause, but rather the final symptom of an empire that was already fractured from within. When these groups moved into the Empire in the 5th century, they found a weakened political and military system that couldn't resist.
The real important causes are more complex: the Empire was divided administratively (West and East), which made defense harder. Plus, the army relied increasingly on mercenaries and "barbarian" soldiers who had no genuine loyalty to the Roman system. There were severe economic crises, inflation, public debt, and trade collapsed. There's also the fact that maintaining such a massive empire was logistically impossible without the resources it had before, and administrative corruption was brutal.
So the answer is yes, it was a combination. The invasions were the final blow, but the Empire was already crumbling from internal weakness. What's interesting is that the East (what we call the Byzantine Empire) survived much longer because it had a better-positioned capital, less military pressure on some frontiers, and a more resilient structure. It wasn't historical inevitability, but a series of political, economic, and military decisions that kept piling up.