How did I install MongoDB to Debian 9?

How did I upgrade MongoDB from 4.2 to 6 on Debian 10 (Buster)?