You’re right. People in real life often use contractions when they speak and so it makes sense that many of our characters would as well. This is equally true for a first person narrator, which uses the character’s voice to narrate the story. Casual voices will use contractions more often. More formal voices will use them less. Some characters may even switch up depending upon the listener or the situation. Let your deep understanding of the character’s individual voice guide you on these choices.
Contractions also show up in third person narratives. Though the narrator isn’t a character in the story, the words you choose create a voice for the narrator and that voice should be distinctive and specific to your intentions for the story. Do you want a voice that sounds highly formal or proper? If so, avoiding contractions may help. A more colloquial voice will use contractions.
Many of us learn this no-contraction rule in school. It’s certainly useful for academic writing and some professional writing. Fiction works differently. Make choices that serve the voice. This, of course, doesn’t mean that you should throw out all the rules you learned about writing in school. Many of them create a sound foundation for all kinds of writing.