Unraveling gluon TMDs in J/ψ and pion production at the EIC | Synapse