In a young, generally healthy person, fainting that occurs while at rest (i.e. NOT during vigorous exercise), is usually benign. The medical term for fainting is syncope, which is pronounced SIN-KO-PEE.
Fainting that occurs predictably with exposure to unsettling thoughts or uncomfortable sensations is almost always due to so-called vasovagal syncope. Synonyms for this benign and common disorder are: vasodepressor syncope, neurocardiogenic syncope, and neurally-mediated syncope. Here is a link. Do a search for some others.
More rarely, syncope in a young person can be due to serious, potentially life-threatening causes. Clues to the presence of such an underlying disorder include family history, syncope with exercise, and syncope associated with chest pain. Conversely, if a person senses that they’re about to faint, and has even a few seconds of premonition, it’s probably vasovagal.
An extensive investigation is seldom necessary for a young person with non-exercise associated syncope. The reputable American Heart Association states as much. So, if you see a doc, don’t be concerned if nothing more is suggested in terms of tests, etc. Indeed, I would consider that a good sign.