The cumulative star formation histories of dwarf galaxies with TNG50. I: environment-driven diversity and connection to quenching | Synapse