Some Apple Intel Macbooks came with an Arm T2 chip that controls security-related functions, e.g. disk encryption. With Apple Silicon, that capability is part of the M1/M2 SoC.
If network SSID history is/was stored on the T2 chip, then it could likely be removed using MacOS settings before installing another operating system.