I am quite athletic, and I regularly workout and play soccer, but I am much less flexible. I can't even bend and put my hands near my toes (it reaches up to my shins when I feel tighness from hamstrings). Also I can't do leg raises keeping my legs straight (I can do many reps with folded legs). Also when playing soccer I can't put my legs higher than my waist to shoot without struggling. Any basic workout/flexibility routine to fix these issues that hamper my calisthenics progression and also sport performance.
Honestly, there really is not a master flexibility course. It's whatever stretches you need to do for your particular problem. Stretch after your workout, when the muscles are warm, instead of at the beginning (when you just want to be warming up). Stretch to the point of mild discomfort (not pain), hold it about ten seconds, ease back to 90%, and then pulse the muscles you're stretching 10 times. Repeat that process twice, and switch to the next stretch
Specifically for kicking upwards, do forward leg lifts, taking a step and swinging your stiff back leg up in a relaxed manner, set it down, do it with your next leg. 10-12 repetitions makes for a good dynamic stretch.
Similarly to yourself I can't get anywhere near my toes when in a forward bend, and I have tight hamstrings etc.
YMMV of course but personally I've found Yoga helpful in this regard (I specifically practice Hatha) - there are multiple poses that help stretch the hamstrings, hip flexors and other muscles that will be effecting your flexibility.
Poses such as Downward dog particularly doing the variants such as with foot pedalling, "hooking" one foot behind the other ankle to deepen the stretch etc. work well but maximum benefit is gained from working all the muscle groups and areas of the body you wish to increase flexibility/strength in.
Frustratingly there's a relative lack of good science-based studies in the effectiveness of yoga however which means I can't offer much more than my own subjective opinion and experience - which is that I've seen strength and flexibility benefits when I'm consistently practicing that go away again when I stop for a period of time. Not exactly what you'd call concrete scientific proof!
Equally frustratingly there's a lot of woo and fluff attached to it with some Yoga schools/teachers which can be extremely off-putting. No, Yoga isn't going to turn you into Mr. Fantastic overnight, no it won't cure cancer, or detox your liver, and no it won't make you a better person. But I have found it to be a good way to improve flexibility and strength in various muscle groups and joints I found hard to access properly during my other exercising.
There are a series of practices called Pawanmuktasana Series from the Bihar Yoga tradition, as systematized by Swami Satyananda. Similar practices were also known as "sushma vyamas" or subtle movements.
Essentially, they are joint mobility exercises. When done with the recommended breathing and awareness, they can significantly increase flexibility and relaxed coordination between different body parts (a component of flexibility).
I was an athlete in high-school and did martial-arts independently, so I was aware of and practiced a number of stretching routines. But when I started a systematic course in yoga, my flexibility increased significantly, and with far less pain and injury than other sports-based systems. It's a science that is rarely taught in a progressive sequence.