I’ve heard people say they are different, but the words in practice are used interchangeably for the most part for those orange-y potatoes.
Recently, I read something arguing that there are many varieties of sweet potatoes, like sweet potato is the overall umbrella, and a yam is a variety of sweet potato. That there are potatoes of other colors that are also sweet. Similar to cantaloupe is a melon, but in English we rarely refer to cantaloupe as melon, we usually say cantaloupe.
I don’t know what explanation is the right one.