Dynamics of phase transitions in a liquid crystal probed by Raman spectroscopy