The answer is indeed to follow the instructions.
I was missing the very important require line that must come before creating the new mongodb object:
And of course you need to run this command in the root of your project as per the instructions:
composer require mongodb/mongodb