Building muscle requires that you are calorie neutral or have a calorie surplus, you generally won’t build muscle in a caloric deficit(I say generally because body recomposition is a thing, but I won’t get into it here. Being calorie neutral is fairly difficult to get right, which is why body builders generally have “gain” phases and “cut phases”. It doesn’t mean pig out, but it’s not uncommon to overshoot and end up with a bit of a belly.
It really boils down to your goals. How much muscle do you want to gain? What’s your ideal weight?
If your muscle gain is on track and you have a bit of a belly, I wouldn’t sweat it too bad, maybe dial back a couple hundred calories at most. You’re in the wrong sub for this discussion, you’ll get much better information in a body building sub.