While this statement has some truth to it, there are also ways to critique it.
On the one hand, you can clearly say that this statement is true in some ways. Nationalism did rise in the 19th century, leading the way to the creation of a large German empire and a unified Italy. Nationalism clearly helped to destroy various empires in the 20th. It was one of the major causes of WWI, which destroyed Germany’s empire and the Ottoman Empire. It helped to bring about WWII in the Pacific, which destroyed Japan’s empire and helped to destroy those of Britain and France (and Holland, though theirs was not a large empire). In these ways, the statement is true.
But there are problems with the statement. First, many of the empires of the 19th century were not really created by nationalism. I would not say that nationalism did a great deal to create the British Empire or the Ottoman Empire. Second, at least one of the empires that was destroyed was not even created in the 19th century. This is the Japanese empire, which did not arise until the 20th century. Finally, some of the destruction of empires occurred more as a result of US attitudes towards imperialism than as a result of nationalist wars. After WWII, the US put pressure on its allies (to some degree) to pull back from imperialism. Since the US was by far the most important country in the free world, its wishes carried a lot of weight.
In these ways, this statement has aspects that are true, but it is not completely accurate in my view.