Microphone input to display p5js

I'm a total beginner and need it for my school project.

Why pick such an advanced project if you know nothing.

Can you please direct me to tutorials

If their were tutorials then their would be little point in the project, you would not be doing anything creative but just copying a set of instructions.

The microphone should be able to map 2 level of sounds: low and high

You need a microphone, amplifier and envelope follower or detector:- Envelope detector - Wikipedia

Then it is trivial to read the output of this with an analogRead function.

Then all you need to do is to see what commands you have to send to p5js to display an image. I suspect this is sent by serial write or serial print.