Workers with job flexibility and security have better mental healthJob flexibility is crucial for mental health with lower odds of distress and anxiety.Job security leads to decreased psychological distress and anxiety in workers.