Practice and modification are key.
If you’re interested in improving your yoga practice, find a qualified teacher or class that suits your level, interest and experience level and go from there. Ask for modifications if you can’t get into certain postures and give it time. Improving flexibility and mastering yoga takes both time and practice.
If you’re looking to improve your flexibility, you can also try foam roller work, static and dynamic stretching, Pilates, stretching classes, etc. All of them will require time to improve your flexibility. Genetics has a big part in how flexible a person is.