In a medium skillet, melt the butter and add the sliced garlic. Cook until fragrant.
Add the spinach and artichokes and cook for 5 minutes until soft.
Add the cream cheese and sour cream and season with salt and black pepper.
Grate the parmesan cheese and mozzarella cheese in the spinach mixture and combine well. Cook for 2 minutes on low heat until the cheese is melted.