Delays in email arrival

While registering for an account in another service two emails were sent to me for verification of my email but they arrived in my inbox two days later.
They were sent on Sun, 4 Jul 2021 17:18 but received in my inbox on Tue, 6 Jul 2021 11:25.
Does anyone know why did this happens and how to prevent delays.