How are derivation paths stored and regenrated for HD wallets?

HD wallets create derivation paths for generated keys. But if you needed to regenerate these keys with your seed or master key, where do you get the derivation paths? I don’t see how they can be stored in the seed somehow. Does a wallet brutforce derivation paths to find UTXOs with balances?