To be specific there is no need to query the blockchain. Read operations (from view or pure functions or to read a variable's state) can be executed locally in your local node as they don't modify the contract's state. So the query is never sent to the blockchain and the result is immediate.
Otherwise both options are possible but my guess is that it simply ...
Your question indicates:
Total cost in wei units = 67123160000000000
Gas price in wei units = 20000000000
This implies that the amount of gas required is 67123160000000000 / 20000000000 = 3356158.
This amount of gas should be identical on every network (assuming that you're using the same compiler in order to generate the byte-code which you are deploying)...
Everything (no exceptions) starts with a transaction signed by an externally owned account (EOA).
Signed transactions are sent to the network and included in a block. Blocks establish the canonical transaction order. (Peer discovery, gossip and mining.)
Ordered transactions are processed by nodes as the blocks arrive. To deploy that contract, first, it is ...