For me, playing with others is still the best way to improve as you don’t always understand what isn’t working, timing etc. by playing along to recordings so ideally join a band, or at least jam with others.
Hopefully the musicians who are supportive in your efforts to improve.
As to how to learn, try to find what works for you. I know of brilliant musicians who can sight read anything, but can’t play happy birthday without music, and equally talented musicians who can’t read a note. There is no right way. Some people need a teacher, others not. everyone is different and as a result, what works brilliantly for them may be hopelessly flawed for you.
finally, a personal beef, unless you are playing in a covers band, why do we beat ourselves up trying to play the exact notes on a recording? So it’s either right, or wrong and so making the player a failure if it’s not as good as the original. Do your own version. Far better to play simpler in the groove than harder out of it. Success to me is getting people tapping their feet or hands along, even better spontaneously dancing. Mostly happens when locked in with the drummer, much easier with a simple line than a harder one.
Rant over….