Old English gise, gese "so be it!," probably from gea, ge "so" (see yea) + si "be it!," from Proto-Germanic *sijai-, from PIE *si-, optative stem of root *es- "to be." Originally stronger than simple yea. Used in Shakespeare mainly as an answer to negative questions. As a noun from 1712. Yes-man is first recorded 1912, American English.
Others are reading
<a href="https://www.etymonline.com/word/yeah">Etymology of yeah by etymonline</a>
Harper, D. (n.d.). Etymology of yeah. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/yeah