Mainnet docs are version-pinned. Check each section's exact version in the sidebar; it can lag the newest upstream release.
The transaction ID (also called transaction hash) of a transaction is computed as
the hash of CHAIN_ID and the
serialized transaction with fields zeroed out for signing
(see different inputs and outputs for which fields are set to zero), and without witness data. In other words, only
all non-witness data is hashed.
sha256(CHAIN_ID ++ serialized_tx(tx))