Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan or line it with parchment paper.
In a large mixing bowl, beat the softened cream cheese and butter together until smooth and creamy.
Add the granulated sugar to the cream cheese mixture and beat until well combined.
Mix in the mashed bananas, eggs, and vanilla extract until fully incorporated.
In a separate bowl, whisk together the baking soda, salt, and flour. Gradually add this dry mixture to the wet ingredients, mixing until just combined. Be careful not to overmix.
If using, fold in the chopped walnuts or pecans.
Pour the batter into the prepared loaf pan and smooth the top with a spatula.
Bake in the preheated oven for 55-65 minutes, or until a toothpick inserted into the center comes out clean.
Allow the bread to cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.