What's actually causing it
Your hip flexors lift your thigh towards your chest. The main one is the iliopsoas, running from your lower spine and inner pelvis to the top of your thigh bone. It's the main hip flexor you have, and it also helps stabilise your hip and lower back 7.
A strain is an injury to a muscle or tendon 4. Sudden injuries to the iliacus and psoas major tend to occur during change-of-direction movements; injuries to rectus femoris, the other big hip flexor, during kicking and sprinting 2.
The slower version is different. Runners and dancers commonly present with pain here from overuse, not one incident 2: load accumulating faster than tissue adapts. The same logic applies to physical work: repeated lifting from low positions, climbing in and out of a truck cab, long stretches of kneeling. There's no study on tradies specifically, so we won't pretend otherwise.
And if you sit all day? The best available study compared people sitting over seven hours daily and moving little against people sitting under four hours and moving more. The active group had about 6.1 degrees more passive hip extension 3. Real and measured, but a snapshot of two groups at one point in time, not proof that sitting caused it 3.