Question arises while I am studying religious philosophy.
When seeking such distinctions, it is useful to simply search for both terms on the web, and to identify what are generally taken to reliable 'institutional' sources such as the Stanford Encyclopedia of Philosophy and the Encyclopedia Britannica (now simply 'Britannica').
The Stanford Encyclopedia of Philosophy states:
Within modern philosophy there are sometimes taken to be two fundamental conceptions of idealism:
Something mental (the mind, spirit, reason, will) is the ultimate foundation of all reality, or even exhaustive of reality, and
Although the existence of something independent of the mind is conceded, everything that we can know about this mind-independent “reality” is held to be so permeated by the creative, formative, or constructive activities of the mind (of some kind or other) that all claims to knowledge must be considered, in some sense, to be a form of self-knowledge.
According to Encyclopedia Britannica:
Spiritualism, in philosophy, a characteristic of any system of thought that affirms the existence of immaterial reality imperceptible to the senses. So defined, spiritualism embraces a vast array of highly diversified philosophical views. Most patently, it applies to any philosophy accepting the notion of an infinite, personal God, the immortality of the soul, or the immateriality of the intellect and will. Less obviously, it includes belief in such ideas as finite cosmic forces or a universal mind, provided that they transcend the limits of gross Materialistic interpretation. Spiritualism as such says nothing about matter, the nature of a supreme being or a universal force, or the precise nature of spiritual reality itself.
With this in mind, Panpsychism in some forms can be said to be idealistic, whereas spiritualism - whilst it can be idealistic - might be said to reside in disciplines/beliefs such as Yoga, Christianity, Buddhism, mediumship and certain meditative/dreamwork practices (and in many other religions/realms).