Sweet Potato vs Yam: Why US Labels Can Be Confusing
Sweet potatoes and true yams are different plants, but in the United States the word yam is often used for orange-fleshed sweet potatoes. A familiar supermarket label therefore may not identify a true yam.

Separate the names from the plants
The Library of Congress identifies sweet potatoes with the morning glory family and true yams with the yam family. North Carolina extension guidance also explains the US naming confusion. The two names are not botanically interchangeable.
Color alone is not enough
Sweet potatoes can have flesh colors other than orange. True yams often have rough, bark-like skin, but appearance varies. Ask the seller for the actual product or variety if the recipe requires something specific rather than relying on color alone.
Read American recipes in context
A US recipe for candied yams may intend orange sweet potatoes. Check its ingredient description or photographs before shopping. A recipe written for a true yam is not automatically a direct replacement recipe for a sweet potato.
Match the preparation to the ingredient
Use preparation and cooking directions written for the product you have. Texture and cooking results can differ, so do not assume identical timing. For canned products, also check whether syrup, sugar or other ingredients have already been added.
Sources
Library of Congress; N.C. Cooperative Extension.