How Bitcoin avoids double spending? If someone is sending bitcoin with low transaction fees and then sends the same bitcoin with higher transaction fees before the previous one is confirmed, so it is obvious that miners will pick the second one, so ethereum has nonce value of each transaction which avoids this, but how does bitcoin avoid it?
If someone is sending bitcoin with low transaction fees and then sends the same bitcoin with higher transaction fees before the previous one is confirmed, so it is obvious that miners will pick the second one


By default, the miner won't pick the second one, except the previous one had Opt-in RBF enabled.

However, technically or theoritically speaking, a miner always has the ability to pick any transaction he likes into his block template, so that he could mine such transaction(s) into his block. It's just the matter of whether his block would be widely accepted by the network (including other miners, non-mining full nodes which the wallet relied on, etc).


  ethereum has nonce value of each transaction which avoids this, but how does bitcoin avoid it?


I don't know much about Ethereum. As far as I know, the UTXO model itself is the equivalent of the nonce value, since each UTXO (uniquely identified with TXID and output index) could be spent only once, otherwise it would be an invalid transaction or block.



Note that the nonce value/UTXO model and double spending by forking the chain are two distinct problems.

Without the nonce value/UTXO model, even an individual chain itself cannot rule out double spending or replayed transactions, which is actually inflation in bitcoin, or replay attack in ethereum (the replayed transaction would make the victim make another unexpected repeated payment, so he would lose money).

However, even with nonce value/UTXO model, the attacker can still produce forked chain to "rewrite the history" (in such case, the previous transaction would be actually discarded, which generally means the previous legitimate payment would be maliciously withdrawn), which is the reason why we need a consensus mechanism like proof-of-work.