I feel an obligation to set the record straight. Actors that say they're affected by something, that it changes their life, that they take it home with them, they're just trying to get nominated for an Oscar! ↗
In most films - especially in regards to the protagonist - really from the get-go they set up some scenario that endears that character to the audience. Or imbues him with some nobility or heroism or something. ↗
Sometimes a character is really based on research that you do. Other times it's just based on your imagination or perhaps your conversation with the director. Or sometimes all of the above. It depends on the movie and character. ↗