If the object of baseball is to SCORE RUNS, why does the pitcher keep trying to stop that from happening?

Shouldnt the pitcher try and help the batter get more hits so they can score more runs? Why does the pitcher keep trying to stop the batter from hitting the ball if the batter is trying to hit the ball? Isnt the object of the game in baseball to score runs? Why does the pitcher keep trying to stop the team from doing that? Why do pitchers try and do the opposite of what the game was meant to be?
How are you going to be "winning the game" if you want it to be all outs and no scoring?

Wow. Where to start. There are TWO teams in baseball. The pitcher is on the opposite team of the person at bat. The pitcher is trying to strike out the batter so that the batter won’t get a run for their team. The object of the game IS to score the most runs, and the pitcher doesn’t want the batter to score, because then the other team would get the points.