Compile Time Arguments?

See What is the best practice to build firmware for IoT nodes with node specific credentials.

If you want to keep the firmware.elf constant, you can also just put your credentials in the LittleFS and have your code read it from there. That way, for each node, you just have to update a file in e.g. data/credentials.txt and do a pio run -t uploadfs, much faster than a firmware rebuild.