What's the difference between fitting a model with feature X and a model that fits with X but then zeros it out?

Say, I have many features to fit a regression model. The features can be categorized into 2 classes: X and Y. I'd like to know how X affects the labels. I wonder the difference between 2 methods:

  1. Directly fitting the models with X, and without Y;
  2. Fitting with X and Y both in, but after fitting, zeroing out coef's of Y and looking at coef of X.

What's the difference between the two? What are they modeling, respectively? Which should I take? Thanks