Not exactly. There are a combination of things you should do to lose weight. Such as eating fewer calories than you burn daily, having an overall healthy diet, engaging in physical activity, having good sleep hygiene, etc.