The word "wert" is a contraction of "were" and "you". It originated from Middle English and was commonly used in Early Modern English as the second-person singular past tense of the verb "to be".
The etymology of "wert" goes back to Old English, where the verb "to be" had a different conjugation for each person. In the second-person singular, the indicative past tense form was "wære", which eventually evolved into "were". When combined with "you", the contraction "wert" was formed.
In various Shakespearean works and other older texts, "wert" is often used to address an individual in a formal or poetic context, such as in phrases like "thou wert my love" or "wert thou there?". However, it is no longer commonly used in modern English and is considered archaic.