Diet sodas have been a helpful tool to me when losing weight, as I enjoy soda enough that it's one thing I don't want to give up- and diet sodas are a way to enjoy it without calories and sugar and it keeps me a bit more satisfied 'in the moment' at least, when I'm eating less food
Do they cause cravings and would switching to something else (water, etc) be better? Oh I'm sure. I'm not aiming for perfect. I've been able to combine keeping drinks diet (soda, flavored water, completely unsweetened sparkling water) + other calorie restriction to lose weight.
I still struggle off and on personally with weight loss in general but that's more because of psychological struggles than anything else. But keeping some things I enjoy but having less of them or less caloric versions of them has been far more sustainable than any other weight-loss lifestyle I've tried- one that's easier to bounce back to when I do struggle