Nakamoto consensus.
You mean "Bitcoin" consensus.
I think every node is independent, so transaction pool is slightly different among nodes so each miner mines a block consisting of different transactions, but mostly likely with the same previous block hash on the longest chain. I hope I'm getting it right.
That's correct.
Miners nowadays connect to a pool that is running a node and builds the blocks, so multiple miners connected to a pool are mining the same block.
I’m thinking about the risk of a majority of full nodes not doing jobs right.
It doesn't matter what
others do; when you are running a full node you rely on your own verification so there is no "risk" here.
The only negative thing about large number of malicious nodes is them wasting your time to verify an invalid block, reject it and ban them.
However, we never know that if some malicious groups trying to break Bitcoin’s consensus system
They can not break anything. If they accept invalid blocks they essentially isolate themselves since they stop on that block and can't build on it while the rest of the network keeps on building on the correct chain.
make so many bad full nodes and trying to mess up the ledger
Just like mempool, every node has its own blockchain (the ledger) and nobody else can mess it up for them.
Therefore, some attacks could be possible here, what's making it not to be attacked?
It is an attack but it is a pointless one since it can not achieve anything or be sustained.