What is the general phenomenon taking place here?
At low pressures the activity of a gas can usually be related in a straightforward way to its partial pressure as
$$a=p/p^{\circ}$$
Since the activity of a substance present in multiple phases is the same in all of the phases, for a volatile compound it suffices to determine the partial pressure in the gas phase to know its activity in condensed phases. This is how the activity of water in different materials including foodstuffs is usually determined.
For the case of a non-volatile solute in a condensed phase things are not so simple. For electrolytes, theories such as Debye-Hückel do a reasonable job of predicting activities at low concentrations, and other theories do better at higher ionic strengths. Electrochemical measurements can provide experimental values of activities. Because ions usually exhibit strong deviations from ideality this field has been studied extensively and even introductory physical chemistry or analytical chemistry textbooks will address it at some length.
One path to determine the activity of a non-volatile non-electrolyte - for which a vapor-pressure measurement is impractical - is to determine the activity of the solvent and to invoke the Gibbs-Duhem equation relating the activities of the solute and solvent. This is what is meant in the Libretext:

The activity coefficient for a nonvolatile, neutral solute is often estimated by non-linear curve fitting, taking into account the molality of the solute and the activity of the solvent (usually its vapor pressure).