Prefrences is a wrapper for the ESP32 NV Storage. To better understand how prefrences is used taking a look at the NVS, the underlaying structure, gives a better understanding to the purpose and scope of the use.
Also, important to NVS is the NVS partation: NVS Partition Generator Utility - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)