As I tweeted to @Sylent_steel, this is a giant subject. It’s close to being the ball game, in the sense that if your audience is caring about your main character, you’ll have a story that engages the audience. It’s too big a subject to fully cover here… but I can provide a helpful tip.
Here’s what is frequently done: the main character has something sad or even tragic that happens to them soon after the story starts, or some time before the story started.
Luke Skywalker’s foster parents are killed. Superman’s planet gets blown up. Harry Potter is treated like dirt by his adoptive family for years. The best man in The Hangover has lost the groom and isn’t going to be able to get him home in time for the wedding. The girls in Pitch Perfect 2 get booted from the a cappella competitive singing circuit. Ron Burgundy gets fired. Dr. Ryan Stone’s spaceship gets blown apart by space debris.
Bingo: instant compassion! You naturally feel sorry for them. And compassion is caring.
I hope this has been helpful!