Which address should be used to send the money as target? We operate a market, there are sellers and buyers. Seller has Hierarchical Deterministic Wallets.  Seller give us the Xpub. Which address should be used as destination, when buyer wants to send money to seller?
I thought I should find the first address that has 0 balance. Do you agree with this strategy?
I think these is only one answer to this question: ask whomever gave you the xpub.
Xpubs define series of keys, but there isn't any implicit contract or understanding about how that should be converted into addresses. The specific index positions to use is one question, but there are others, like what type of address/script to use (P2PKH, P2WPKH, ...). All of these are things you should ask the receiver, as it is ultimately up to them to determine what kinds of transactions they would consider a valid payment.
To make a analogy: the receiver told you where they live, and you owe them money, but they haven't told you anything else. Do they want you to pay to their bank account? Do they want you to put an envelope with cash in the mail? Do they want you to bury a treasury chest with jewels under their lawn at night? All of these are in some shape or form ways that value can be transferred, but arguably you wouldn't go bury a treasury chest in their lawn without even talking to them, and expect them to treat that as a payment.