How do/did chemists observer/infer the structure of organic molecules and reactions? As I understand organic chemistry there is no simple generalization that allows us to predict reaction outcomes- rather we transform molecules using a sequence of known reactions.

This has me wondering how these known reactions came to be known. My first guess would be that the structure was empirically observed before and after the reaction.  If this is the case what instrumentation would be used to observe this?

If not, how else were these reactions determined and if they were not all developed by trial and error, what is the name of the branch of chemistry that deals with hypothesizing them?
Various crystallographic techniques exist, the lab technique I have used most is x-ray crystallography

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1186895/pdf/mp53000008.pdf

Currently I specialize in computational chemistry, which can estimate (with very high accuracy) the geometry of a molecule which gives the lowest energy (aka the equilibrium geoemetry) through a process called geoemetry optimization

https://www.shodor.org/chemviz/optimization/students/background.html