Patience is key! Mounting means work for many horses. You want the horse to be relaxed at the mounting block, reassure them it's not too bad. I would groom my girl by the mounting block. Eliminate distractions. If that doesn't work, ground work is always an excellent solution! Keep them relaxed, listening to your voice, and following your pressure. Let them know when this or that action is appropriate for certain situations.
Emma massingale has a good YouTube video on it :)
Start by doing ground work by stopping and dropping/letting go of the reins and if they keep walking smack them with the lead rope or your hand. After they stop walking away when the lead rope is dropped reward them with a treat. Then you can get on the and they won’t walk away anymore!😁