Add the basil leaves, chopped walnuts, minced garlic cloves, salt, and pepper to a food processor (or blender). Puree/blend for about 20 seconds.
Scrape the sides with a silicone spatula and repeat until the basil is finely minced.
Add the grated parmesan and puree/blend again for a few seconds until the parmesan is mixed in.
While pureeing/blending, slowly add the olive oil. Slowly adding the oil while blending/processing helps emulsify the pesto.
Once the pesto is ready, you can give it a taste and adjust the seasoning (adding more salt or pepper) and consistency (adding a bit more oil if you want it more liquid).