Historically, chemists initially differentiated by subjecting this compound to all sorts of conditions, notifying the outcome and if somebody else had previously reported such a compound compare to their published properties to determine whether it was the same compound or not. They did not know what the molecular structure or sum formula was — and they did not need to. Merely knowing ‘this compound reacts just like Berzelius’’ or ‘this one has the same composition but is notably different’ was enough.
While the concept of e.g. tetravalent carbon was also a very old one, it did not mean that chemists had any understanding of what molecular structures looked like. For example, one German chemist from the late 19th or early 20th century preferred drawing ‘sausage depictions’, where a carbon would be a sausage of length 4 while each hydrogen would be a sausage of length 1 and oxygen of length 2. These would then be put together so that each sausage was double-layered. These served as depictions for the chemists’ imaginations, they were not considered an accurate representation of molecules in any way.
Finally, the ‘all sorts of conditions’ approach also allowed some deductions on the chemical nature. For example, if you were able to introduce iodine while something else gets removed and you end up with a known compound (identified previously e.g. as 1-iodobutane) you could infer that there must have been some functionality likely at the 1 position of a four-carbon chain. And so on and so forth.