Start here. This is the direct spoken answer to practice first.
Why this question matters
CORS is often misunderstood as a security wall around an API. It is really a browser policy boundary.
CORS controls which browser origins are allowed to read responses from the API. It does not stop non-browser clients like curl, scripts, or mobile apps from sending requests. The API still needs authentication, authorization, validation, and rate limiting. Allowing an origin is not the same as allowing a user to access data.