In this scenario, the ammonium nitrate is dissolving in water, which is an endothermic process. This means that it absorbs energy from the surroundings, leading to a decrease in temperature in the beaker, making it feel cold to the touch.
Therefore, the part of the system that is absorbing the energy from the surroundings is the water (specifically the solution of ammonium nitrate in water).