Different pronunciation in Japanese words

Another thing I find a bit off is the fact some words like this are written like “hi” but the pronunciation is automatically spelled different like “nichi”, which is confusing cuz I don´t know the real one easily