Best way to find list of UTXO related to xpub

Apparently the way to find a list of UTXO related to an xpub is to derive all addresses from the master private key and query a node with each and every one of them.

It is possible to generate 4294967296 addresses from a single extended key.

How should a wallet proceed to manage this in an efficient way?

I guess that in an ideal situation, addresses are generated in a sequential order… but my intuition tells me that nothing prevents a wallet from doing otherwise.