For one thing, everyone has a Basal Metabolic Rate and you can go about 500 calories above your BMR for bulking or 500 below for cutting. You can figure yours out by googling “Basal Metabolic Calculator”.
I’m not sure if these calculators will be completely accurate but you could use them as a baseline and then just check your weight periodically after setting a daily caloric limit.
If you’re gaining a bit too fast and getting fat, then you’d just lower your calories a little bit. If you’re doing the opposite and it feels like you can’t gain any muscle, you’d want to increase your calories slightly until you see better results.
Due to your body being different than your friends, you’re going to have to eat different amounts to get results. Everyone’s different. Know your body, and figure out what diet works best for you.