How did the first chemists know that a sample contained so and so elements? If they tried to find through reactions,they should know what elements make up the other reactant(s), and how it reacts beforehand (which is absurd as elements weren't discovered & studied before that)
The notion of chemical element in modern sense arised at the end of 19 century.
Before this, the term "element" was obviously too fuzzy to discuss here, as well as methods and proofs involved.
After this, the optical spectroscopy was method of choice to find new elements and prove their existence, because of distinct and reproducible spectra. See the history of helium, for example.
Of course, besides of spectroscopy, chemists proved the finding of new elements by separation of individual substances. For example, metals are expected to form oxides and salts with (at least roughly) expected properties and mutual transformations. In particular, salts, even in microamounts, may be recrystallized to form visually distinct crystals of individual substance. If such a substance possessed properties not seen before, this was indication/proof of the presence of new element.
It's actually easier than you think. Elements don't break down, so once you find reactions that cause substances to combine, the combination is not an element and any degradation reactions mean that the reactant is not an element. So before the modern era, you had a fairly good idea that something was an element when you couldn't find reactions that broke down the substance. And once we were good enough to weigh carefully the reactants and products, we can determine the quantitative relationships to further eliminate substances as being elements.