As described by it's name, txindex only index transaction and cannot be used to query balance of specific address.
Not exactly true. You can use the
listunspent RPC for legacy wallets or the
scantxoutset RPC if you're comfortable with descriptors (it does not require creating any wallet file), and then add up the resulting "address" fields in the array.
You can even get the confirmed balance by ignoring every field with confirmations set to 0.