Use high-quality ingredients. I recommend using fresh basil and spinach, whole garlic cloves, good olive oil, and fresh Parmigiano Reggiano.
If your pesto seems too thick, you can easily fix this issue by adding more oil. Start with 1 tsp at a time until it reaches the consistency you are looking for. If you notice it becomes too thin, you can always add some more basil or spinach leaves.
If you are looking to mimic the texture of classic pesto, you can add nut-free alternatives such as hemp seeds, sunflower seeds, or pumpkin seeds.