This question has two layers of answers. Many people hear only the first layer and sign up.
First layer: certification is fast. Entry-level courses (such as AIDA 2, PADI Freediver, and SSI Level 1) usually take 2–4 days: a theory segment, a pool segment, and an open water segment. Many people finish by taking a weekend plus one day off.
Second layer: diving with ease takes much longer. Getting certified only means you have been trained and know the rules; equalization, relaxation, finning efficiency, and weighting must be honed through repeated practice with a buddy afterward. Most people need a few months to a year before descent feels easy. If you want to follow the instructor path, it is usually one to two years: first reach an advanced freediver certification, then build open water experience, add first aid qualifications, and only then take the instructor course.
The biggest thing to be wary of is “fast-track” courses. Courses can be compressed; equalization and your body’s adaptation cannot. Pushing depth to keep up with progress often results in ear injury and a bad experience, or worse.
So: certification is a matter of days; ability is measured in quarters. Set your expectations to the latter, and you will keep at it longer and enjoy it more.