Smegma is a white substance which is a combination of oil secreted by the body and dead skins. Smegma can be found in people with a penis or vulva. For people with penises, it is found at the tip of an uncircumcised penis and for people with vulvas, it is found under the folds of the labia. There are oil glands in the genitals which is a part of the anatomy. The oils gets secreted and accumulates in the genitals which, if not cleaned regularly, can cause problems. Smegma is not a sign of an STI but it can easily be avoided by maintaining hygiene. It is important to clean your genitals with water to avoid smegma.
Sources:
https://www.healthline.com/health/how-to-get-rid-of-smegma
https://www.news-medical.net/health/What-is-smegma.aspx
https://www.verywellhealth.com/what-is-smegma-5084996
https://www.webmd.com/sex/what-is-smegma
https://www.medicalnewstoday.com/articles/320514#in-males
https://www.nhs.uk/common-health-questions/mens-health/why-is-my-penis-smelly-and-sore/