function of GND pin in voltage regulators
The adjustable  regulators use a ratio of the Vout to 0V back into Vfb to be equal to the internal Vref.
Gnd is simply defined as your 0V reference.
But where you chose that depends on the sense voltage and return current which can introduce voltage drop. When grounds are shared, we must consider the current and rise time if any dynamic loads and choose star grounds from source where they are shared so that 0V is not influenced by those return currents and path impedance.
If it is floating from earth ground then common mode noise must be balanced to minimize the interfacing effects of multiple SMPS on high impedance floating gnds.