CORS is the most copy-pasted topic in web dev. Your frontend hits an API, you see "CORS error" in the console, you Google it, you add Access-Control-Allow-Origin: *, it works, you move on. You never actually learned what CORS does.
This is the article that explains it. Read it once and you'll debug CORS in two minutes instead of two hours.
The mental model: the browser is the enforcer
The biggest misconception: people think CORS is a server feature. It's not. It's a browser feature.