Some aspects of total war have been around as long as war has. For example, the idea that destroying a country’s agriculture can help defeat it has been used in wars for thousands of years.
However, most wars were not close to total war because the technology involved did not allow for total war. It was only as war became more mobile and more industrial that total war truly emerged. WWI can be seen as the first total war. This was because many countries had to mobilize all their resources (for example, by taking men out of factory work and replacing them with women) to fight the war. WWII extended this even farther because strategic bombing to destroy non-military targets was possible by this time.