not necessarily; not always; there is no guarantee that
Used after a clause to indicate that something is not always the case or cannot be taken for granted. Often follows からといって or a plain-form predicate.
高いものが必ずしも良いとは限らない。
Expensive things are not necessarily good.
日本人だからといって、寿司が好きだとは限らない。
Just because someone is Japanese doesn't mean they like sushi.
必ずしも is an adverb meaning 'not necessarily' that often pairs with とは限らない at the end of the sentence to complete the 'not necessarily...' meaning.
わけではない also softens a statement to mean 'it doesn't mean that...', but とは限らない specifically stresses that exceptions exist and nothing is guaranteed.
Combination of the particle と (quoting particle), the topic marker は, and the negative form of 限る (to limit). Literally 'it is not limited to (the case that) ...', giving the meaning 'it is not necessarily the case that ...'.