Difference between bitcoin-cli getnetworkinfo version and bitcoind --version
bitcoind --version is asking the bitcoind binary what its version is
bitcoin-cli getnetworkinfo asks the currently running bitcoind what its version is

So this means that you at some point had a 0.18.0 bitcoind, started it, then installed a 0.20.0 one, but the 0.18.0 one is still running.