Preheat your oven to 350°F (175°C).
Make the cookie batter. In a large bowl, cream butter, sugar, and brown sugar until the mixture becomes light and fluffy.
Add the egg, mashed bananas, and vanilla to the mixture, and mix on low speed until the batter is smooth.
Incorporate the dry ingredients: baking soda, salt, and flour, mixing until everything is well combined. I like to use spatula here to prevent overmixing and too cakey cookies.
Portion the cookies. Use a cookie scoop (a 2-inch ice cream scoop works well) to form cookie dough portions on a parchment-lined or greased sheet pan, ensuring there is at least a 2-inch gap between each cookie.
The batter will be sticky due to bananas. If you find it hard to work with a cookie scoop, then I recommend lightly dusting your hands with flour while scooping and rolling the dough by hand will solve the problem. Alternatively, chilling the dough briefly can also make sticky dough easier to handle.
Bake for 10-12 minutes, or until the edges of the cookies turn a golden brown.
Allow the cookies to cool for 2-3 minutes on the pan, then transfer them to a cooling rack to cool completely.
Make the frosting. To make the frosting, beat together the cream cheese and butter until the mixture becomes fluffy.
Gradually add the powdered sugar and vanilla, continuing to beat until the frosting is smooth.
Using a small spoon, spread the frosting over the cooled cookies, and if desired, sprinkle them with chopped pecan nuts and additional banana slices.