Metabolism can change with age and life stage. That is not a failure of effort.
Perimenopause, post-pregnancy shifts, thyroid changes, and insulin resistance all alter how your body stores and releases energy. A diet that worked at 28 may not work at 42. It is biology doing what biology does.