Assuming you already understand when to use か and ひ, and that when talking about Japan it is always にち or に, and excepting, like, 毎日 一日 and 何日,
If it starts with 日 it’s にち, if it ends with 日 it’s じつ.
Boom I just achieved world peace
this isn’t actually a rule
But genuinely 日 word starting with じつ is extremely rare.