The XXL survey. XLIX. Linking the members star formation histories to the cluster mass assembly in the z = 1.98 galaxy cluster XLSSC 122 | Synapse