and this frustrating captcha
Look into your calendar. Or this topic:
https://bitcointalk.org/index.php?topic=5447077.0Edit: Posted without solving captcha, it can be easily skipped if you want.
how Bitcoin Core software implement the consensus rules that define the valid format and structure of Bitcoin transactions,
There are many rules, you can download and read the code here:
https://github.com/bitcoin/bitcoin/and how does it ensure that all nodes in the network agree on the validity of each transaction through the process of transaction verification?
1. By checking Proof of Work of the whole chain. The strongest valid chain is the correct one.
2. The valid chain is determined by the code, as I mentioned, there are many rules, and each full node has to independently validate everything from the very beginning, to the latest block.