it doesn’t mean that~
Says that something is not necessarily true or not the whole story.
This pattern means 'it doesn't mean that ~' or 'it's not that ~'. You use it to deny an assumption or a conclusion someone might draw, but often you don't deny the fact itself. For example, if you say 'I like him, but it doesn't mean I want to marry him', the first part is true, but the conclusion is denied. So わけではない softens the denial and adds nuance.
It's often used with 必ずしも (not necessarily) to say 'not necessarily'. In conversation, you can shorten it to わけじゃない. It's a common spoken pattern, but also appears in writing. Attach to the plain form, but for nouns and な-adjectives, you need な before わけ (e.g., 学生なわけではない, 静かなわけではない).