On a serious note (compared to my last post and response to your question, that is), it actually depends on whether or not you believe wholeheartedly in the folklore associated with yamask. Given the frequency of a yamask birth, the consensus among pokémon researchers is that it’s statistically unlikely that yamask are the spirits of deceased humans. Rather, it’s more likely that yamask are simply pokémon attached to mask-like objects that, through our tendency to see ourselves in literally everything (https://en.wikipedia.org/wiki/Pareidolia), human beings have interpreted to resemble human faces.
The same can be said for phantump, actually. They’re not literally the lost souls of human children; we just created folklore that says they are because their appearances and cries resemble those of distressed toddlers. The only difference is that Kaloseans realized this rather quickly because trevenant decidedly do not resemble distressed toddlers on any level.