how do you think BTCPayServer and every system that does onchain receiving works?
(It’s fine)
I recommend using BIP-32 to derive subkeys.
One thing to be aware of is gap limit. If you have 1K addresses that got issued, but none of them received, some wallets will just give up on scanning by when they see 20 addresses without any action
So, back up the index of the last address issued somewhere, just to make your life easier
