In principle, you can, but the process will be very slow. You will need to count the calories of food consumed to achieve a calorie deficit.
You need to switch to proper nutrition and stick to it all the time, and not just sit on vegetables and boiled chicken for a couple of months. Also drink enough water: it removes toxins, in addition, we often confuse thirst and hunger.
You also need to understand that if you have a sedentary job, and after that you go home and sit until midnight on social networks, then losing weight will be almost impossible due to lack of movement.
Think about how you can bring more physical activity into your day. You don't have to torture yourself with jogging in the morning or sweating for hours in the gym. You can at least add long walks, cycling in the nearest park, dancing, outdoor games (tennis, football) - any activity that will not be a burden for you and which you can do several times a week (or you can do it every day)
Exercise will help you burn more calories than before and gradually lose weight.
Each person has a daily calorie intake that they burn based on weight, height and age. It can be calculated using many calculators, this will be the norm that you will burn just lying on the couch. To lose weight - you need to spend more calories per day than your daily norm, to get fat - on the contrary. Of course, you can simply eat less, starve somewhere, but it would be much better to combine this with physical activity. It is enough to move a little more - to walk, do exercises, exercise - and the result will be doubly better. This process is far from being as fast as you might think - here you will have to spend more than one month and, best of all, if you change your lifestyle in this way, so that the result is fixed.
Rather, you need to speak based on your individual characteristics. As far as I can tell from my experience, the result will either be very slow or tend to zero. In any case, there should be high activity (it's one thing if you sit in front of a laptop on the couch, and another thing if you "spin like a squirrel in a wheel" at work from morning to evening).
You can! Paying attention to nutrition, you gain shape and discipline, consuming the energy your body needs in the form of calories and replacing foods with high-quality and functional ones, you will build, but in the future the result will not be fixed.
In order for the regime to work for the future and the excess weight does not return after two months or half a year, you need to figure out how we are arranged.