Check out example codes for "update mongodb version ubuntu". It will help you in understanding the concepts better.
Code Example 1
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 656408E390CFB1F5
Code Example 2
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
Learn ReactJs, React Native from akashmittal.com