This is not a claim that can be proven from archaeological evidence.

The material record does not preserve mental states.

But the behavioral evidence constrains the range of plausible interpretations.

Behaviors that require theory of mind to execute provide indirect evidence for its presence.

The burial cluster at Shanidar, if it reflects deliberate placement of bodies in a specific location over an extended period, is a behavior that requires at minimum the recognition that what happened to those individuals matters — that their bodies deserve specific treatment rather than abandonment.

That is a form of social cognition that presupposes the recognition of others as beings whose fate is meaningful.