The most extreme, suboptimal type of diet/ exercise program would ‘work’ up to a point.
Decided to lose weight and eat 800 calories a day? You'd lose weight.
Decided to start running every day to trim down? You'd trim down.
Decided to start strength-training with a really inefficient, injury-promoting exercise technique and programming? You'd gain muscle and get stronger.
Decided to eliminate one specific food or a food group because some writer in a fitness magazine said eating it 'is the number one reason you can't lose weight'? You'd lose weight.
All these scenarios are far from optimal changes, however there is a stimuli/change provided. You're doing x , something you’ve never done before; and now that you started doing x, your body responds accordingly. However, because these aren't optimal ways to reach your goals, sooner than later (~6 weeks), x would lead to negative outcomes and you'd quit.
You'll feel extremely lethargic, snappy, and start binging; your knees will start bothering you; you'll tweak a muscle; you'll crave the one food group you cannot have and dream about bread, cookies, pasta and what not. You'll come to the (incorrect) realization of ‘Screw this fitness lifestyle. It isn’t meant for me. I’m not one of those people’.
Here's what you don't know: optimal is far from extreme. Getting stronger and injury free requires a properly-designed program with a correct technique form. Getting leaner is far from reducing your calories to a ridiculous intake and completely eliminating a food group. Not even close. Running isn't the only form of cardiovascular exercise you must do if you want to lose weight. Walking would work too.
Optimal is all about making positive changes that you can adhere to for the long run, and slowly but surely improve upon. My suggestion to you is to make small but meaningful steps towards improving your well-being.
Baby steps. This means, start adding veggies to 2 of your daily meals, start walking for 20 minutes twice a week, or add protein to each meal.
Baby steps make the process easier to initiate and get accustomed to.
Baby steps also accumulate. With enough consistent baby steps, you will be able to reach your goal. Have patience and believe in yourself.