First, buy the right kind. Full fat bricks of cream cheese for baking (not for spreading on bagels) must be used.
Be sure to buy a high quality brand. Some generic brands are watery and rubbery.
The MOST IMPORTANT thing is to ensure your cream cheese is completely and totally softened to room temperature. If it’s too cold, you’ll end up with a lumpy cheesecake batter.