Preheat oven to 350 degrees F (175 degrees C). Spray a baking sheet with cooking spray. Clean mushrooms and make sure there is no dirt left. Carefully break off stems. Discard tough end of stems. Chop stems extremely fine.
Heat oil in a large skillet over medium heat. Add garlic, onions, and chopped mushroom stems to the skillet. Fry until any moisture has disappeared, make sure you do not burn the garlic.
Stir in cream cheese, Parmesan cheese, black pepper, and cayenne pepper. Mixture will be thick. Using a small spoon, fill each mushroom cap with a generous amount of stuffing. Depending on how big your mushrooms are and how full you stuff them will depend on how many you use. Arrange the mushroom caps on prepared cookie sheet.
Bake for 20-25 minutes in the preheated oven, or until the mushrooms are hot and liquid.