First, preheat the oven to 350℉
Open the can of yams and drain the syrup completely. There is no need to rinse them.
Add the drained yams, granulated sugar, melted butter, vanilla extract, and salt to a large mixing bowl. Use a hand mixer to combine, leaving a few small pieces of sweet potato for texture.
Taste the mixture and adjust the salt before adding the eggs. The filling should taste slightly saltier than you want the finished casserole. Add the beaten eggs and mix until combined.
Transfer the sweet potato mixture to an 8×8-inch baking dish. Bake for 40 minutes.
While the casserole bakes, combine the chopped pecans, brown sugar, flour, melted butter, and cinnamon in a separate bowl to make the topping.
After 40 minutes, carefully remove the casserole from the oven. Spread the pecan topping evenly over the sweet potato filling.
Return the casserole to the oven and bake for another 25 minutes.
Remove from the oven and allow the casserole to cool slightly before serving.