Sweet potatoes are the main, tuberous roots of sweet potato plants that people eat. Although they are made into pies, they’re colorful, and they are fairly sweet, they’re still not fruits. Something has to be a fruit botanically for it to be one culinarily, and sweet potatoes don’t contain seeds. They are roots and therefore vegetables.
They are actually scientifically shown to be one of the least fruit-like vegetables. In one study, zero out of twenty participants categorized sweet potatoes as fruits. In another, sweet potatoes scored as the least fruity of all tested food items. Some reasons for this are that they don’t have seeds, they need to be cooked, they grow underground, and they’re very starchy, not juicy.
Interestingly, they are also not usually considered to actually be tubers like potatoes and yams (yes, they are different) are. This is because of the fact that sweet potatoes are roots, not part of the stem. Again though, neither yams nor either type of potato are fruits. They’re all vegetables.