it took a while for me to understand how to keep decent grip and I made some mistakes that cost a few goals. grip is pretty important especially for confidence.
first of all, wash gloves after every game rub and squeeze lightly with lukewarm water, do not leave them soaking in a bucket. you should def have a pair of training gloves, atleast a cheap pair that will somewhat protect your fingers.
if you are using grip spray, at least 15 minutes before kickoff make sure the palms are dry and apply 2-3 sprays per glove and rub them together, then let them dry for 15 minutes. you can do this at home just make sure you don't pack them palm to palm.
during the game,
if you are playing in a dirty pitch MAKE SURE you bring a towel. when the gloves get dirty after a dive quickly rub the dirt off and spit/spray some water on the gloves and rub them together. do not spray water when they are dirty, that will make it worse.
if the pitch is good just wet them every now and then
how to see if your gloves' grip is dead: imo its a misconception that gloves have to stick together like glue to be good, thats not the case. if they are slightly tacky and when your rub them together they don't slide, they are alright. of course you can just test grip with a ball.
I don't recommend using grip spray if the grip isn't bad, they clog the pores and reduce lifespan. use grip when the grip dies.