It depends on the jurisdiction. Where I did grad school, "psychologist" is a protected title, and only allowed to be used if you are licensed to practice psychology (e.g., clinical psychologists). Lots of social/IO/cognitive/etc psychologists also call themselves psychologists, but I don't think the licensing board really goes after those people because it doesn't harm potential clients. So, if you're a person with a PhD in cognitive psychology and you are faculty at a university, and you call yourself a psychologist, unlikely to get in trouble. If you have a PhD in cognitive psychology and open a private practice where you are treating clients/patients, and you call yourself a psychologist, you're more likely to face consequences because it's confusing to the public to call yourself a psychologist when you aren't licensed. But, again, definitely will vary by jurisdiction.