I am currently investigating Gravity force model for my propagation study and I was wondering how is the raw Cosine and Sine coefficients coming from a EGM data is getting converted into time-dependant coefficients. How are the coefficients related to the time?

For example,
Lets consider EGM 96,
The raw values are: C_{2, 1} = -0.186987635955e-09 and S_{2, 1} = 0.119528012031e-08

and when I query the C and S parameters I get different values:

Are you sure you have loaded EGM96 and not another gravity field?
You can check it by adding this at the end of your program (i.e. after all files loading
have occurred):

If you see your EGM96 file, then you have loaded it. If you don’t see this file but for example something like eigen-6s.gfc, it means you loaded another file that is present in the default orekit-data and that you forgot to remove when adding EGM96. Beware that you should have only one gravity field file in your data set, otherwise the Orekit will load the first one that it finds and that has sufficient degree and order. So if you add EGM96, you should remove the other gravity field.

EGM96 does not depend on time, so the same value should always be return regardless of the date you put in the onDate call. Eigen-6s does depend on time, with a combination of linear trend, harmonic coefficients at half-year period and harmonic coefficients at one year period. Other gravity fields can have different evolution models.