You need to understand chord progressions well…to the point of intuitiveness.
Listening to others for cues and recognizing where they are leading can be very important & helpful
Having “go to” licks available in every chord is helpful
Speed comes in it’s own time…learn patience
To learn to jam with others you need to jam with others…no amount of isolated practice can equal the experience of playing with others.
Timing is more important than notes. You can miss a note without others noticing so much…missed timing can throw off the whole group. (in a jam with two pros the other day I got a compliment on my mando playing: “that’s a great chop; perfectly in the pocket even on the wrong chords!” haha…)
Stick to doing what you can…not what you wish you could. (I was way over my head at the jam mentioned above…so I mostly stayed simple on leads or just played rhythm & what I was VERY familiar with for licks.)
My two cents worth anyway…
I don’t have any “system” for learning how to play with others except for doing it a lot and be willing to forgive yourself (and others) for mistakes.