The safest way is usually to do it with an instructor, preferably as part of a dedicated beginner class. Or at least among a group of veterans who are willing to slow down to accommodate you.
Instructors who have been working with beginners for a while will be able to anticipate and prevent all sorts of beginner mistakes. They’ll know what equipment you should use, the best way to get started, what fundamentals you should learn first, etc.
These are all things that are hard to pick up if you try to get started on your own. And even if you have a veteran to help you out, knowing how to do something isn’t the same as knowing how to teach something.
Certified instructors and people who run training schools also need to worry about being sued by a sports injury attorney, as this website shows. This puts extra pressure on them to run a tight ship and keep every student safe, which is one more reason to favor instructors and training schools as a beginner.