Although it's possible to lose weight without exercising, it will definitely be more of a challenge. Your physical activity is super important for using calories up that you can, therefore, include into your diet while still losing weight. Not that it has to be traditional working out such as going to the gym, but trying to lead an active lifestyle is a huge help! Even including things like short walks throughout the day or a few minutes of home exercises here and there can really add up.
Either way though, your weight loss will come from a calorie deficit, consuming less than your body needs to maintain its weight. Without regular physical activity, your body doesn't use that many calories. Therefore losing weight would require restricting calories further. This is an issue because you need to consume enough calories to maintain good health and get enough nutrients. If you are rather sedentary, I would recommend a much slower rate of weight loss (and in relation to that, not restricting calories as much).
Remember that keeping a healthy and balanced diet is really important regardless of whether you can include exercise or not.