>>213174868Except it's more complicated than that because there are stress languages where only the pitch changes.
The real difference between stress and pitch accent is that in a pitch accent language there can be multiple possible pitch contours for the accented syllable (e.g. Swedish, Serbo-Croatian but not Kantou Japanese) and/or the pitch contour must (with few exceptions) always be present when the word is pronounced.
In a stress language the stressed syllable usually only receives a pitch contour when it is the nucleus of a prosodic phrase (= when the word is itself "stressed" within the sentence) and this contour can take on various different pitch patterns depending on the context of the phrase in the sentence. So one part of a sentence may have rising intonation and another falling intonation, and the contour of the stressed syllable is determined by that.
In pitch-accent and tonal languages, prosodic tone is usually instead added to the existing tonal contour of the phrase from what I gather.
The English linguist Dr Geoff Lindsey has a great video explaining (English) prosody (and just generally an interesting YouTube channel about English language linguistics, particularly phonology):
https://www.youtube.com/watch?v=4IJLyFAzYes