Audio on my phone while using earphones is sometimes good and sometimes isn't I have Android 10, phone is Umidigi F2 

Sometimes when I use my earphones audio is good but sometimes it's bad. I can't find any reason for that, for example I'll use my phone for some time while having earphones plugged in and audio is good, but after a couple hours I'll use my phone again and plug in earphones and audio would be bad and it would garble.

Any help would be appreciated! :)
First thing first, you should know that there a few basic solutions you can try, just to make sure that it’s not a hardware issue causing this:

Check the phone’s volume: Simply press the volume rocker up, in order to increase the volume. Maybe the phone was on silent, which affected the media volume as well.

Restart your phone: A simple reboot can be the solution for many problems.

Clean the headphone jack: If you’re having this issue only when the headphones are plugged in, try cleaning the jack. Also, try another pair of headphones, since it could be them causing the problem.

Clean the speakers: There some smartphones which have some pretty unusual grills for the speakers and they tend to accumulate a lot of stuff which eventually blocks the speakers from emitting sound. However, don’t use a needle or a toothpick, since this can instantly damage the speaker. Instead, rely on a Q-tip for this.

Clean the cache of your music app: Go to Settings > Apps and look for your default music app, then tap on it. Look for the Clean cache button and tap on it.

Check for any moisture or water-inflicted damage: Turn off the phone, remove the battery, as well as the SIM and memory card, and see if there’s any moisture or residue inside the phone, which can affect its normal functionality. Eventually, by using the dryer on low heat, keep it for a few seconds over the phone.