How is temperature constant in enthalpy change formula? I have learnt that temperature sort of indicates the internal energy of a system, or at least this is my intuition. So if temperature is constant, then internal energy is constant as well.
But in the derivation of the following formula
$$\begin{align}{
{\Delta H = \Delta U + \Delta n_g RT}}
  \end{align} $$
T doesn't have a delta, which means it's treated like a constant value, but then wouldn't this make $\Delta U = 0$? In fact most questions in my textbook have the statement &quot;at constant pressure and 298/300 K&quot;, but $\Delta U$ isn't 0 despite the temperature being constant.
Am I missing/neglecting something here?
The internal energy of a system is in general not only a function of temperature. This means that holding the temperature constant does not guarantee that the energy will be constant. The statement that the energy can be expressed as a function of only the temperature applies to the particular case of ideal gases.
Assuming that gases are ideal simplifies expressions for the change in internal energy and enthalpy. For ideal gases at constant temperature and composition ($\Delta T=0$ and $\Delta n=0$):
$$\Delta U = 0\\\Delta H = 0 \tag{1}$$
These expressions are not general. They apply to ideal gases at constant temperature and composition.
In general,
$$\Delta H = \Delta U + \Delta (pV) \tag{2}$$
For an ideal gas at constant temperature,  $ \Delta (pV)= \Delta (nRT)= RT\Delta n$
so that
$$\Delta H = \Delta U + RT\Delta n \tag{3}$$
It is also worth remembering that at constant pressure $w=-p \Delta V$ so that  equation (2) becomes $\Delta H = q_p$ (in general for any substance, provided p is constant and only pV work is done). But what is $\Delta U$?
We can show from the ideal gas law that it is only a function of T for a constant amount of a pure ideal gas, and, from the kinetic theory of gases, one can also show that for one mole,
$$U_{m,i} = f_iRT$$
where $f_i$ is a constant that depends only on the type of gas (not on thermodynamic variables). Then
$$\Delta U = \sum_i U_{m,i}\Delta n_i = RT \sum_i f_i \Delta n_i $$
for a mixture of ideal gases.