Preheat oven to 350°F (176°C).
In a medium-large sized mixing bowl, add the cream cheese and sour cream. Beat with the hand mixer until fluffy.
In a skillet, saute the onion and garlic in a bit of olive oil over medium heat until golden brown. Season with a pinch of salt. If you are baking the dip in a small cast-iron pan, you can use it to cook the onions. Add the onions and garlic to the bowl.
Squeeze out as much water as you possibly can from the spinach. Add the dry spinach to the bowl of cheese.
After draining the artichoke hearts, pat them dry if necessary. Chop into small bite-sized chunks. Add to the bowl.
Add the grated parmesan, salt, pepper, and the divided amount of mozzarella to the bowl. Stir well to combine.
Lightly grease your baking dish of choice, spoon in the dip, and then top with the second half of the divided mozzarella.
Bake in the preheated oven for 30 minutes. After baking, you can (optionally) switch the oven to broil for about 3-5 minutes to cook the mozzarella topping.
It will be very hot when it's out of the oven so cool for just a few minutes before serving.