Hey kiddo! So basically the Sun and other stars use nuclear fusion to release energy. The sequence of nuclear fusion reactions in a star is complex but overall hydrogen nuclei join to form helium nuclei. (I attached a detailed photo) From looking at the picture you can see that one nuclear fusion reaction that takes place: The table summarises the extreme conditions needed for fusion to happen.
Please let me know if you need further assistance or have more questions!
~Brooke❤️