Introduce yourself for the profile page:

Method — marker first, then follow it everywhere
  1. Submit Udemy123 — devtools search finds the marker twice ("1 of 2").
  2. First reflection, the <span>: fully encoded there — tag payloads are dead on arrival.
  3. Second reflection, inside a <script>: the value sits in a single-quoted JS string. Tags are encoded here too — but your quotes are not.
  4. Ask like the lesson does: the variable is closed by ' — how do I exit it and keep the JavaScript valid?
  5. You're already inside a script tag — no need to add another one. End the statement properly, comment leftovers, inject, done.
Spoiler: break the JS string, keep it valid
https://stuxnet.pro/xss/lab9/index.php?name=';alert(1);//

' closes the string · ; ends the statement so the code stays valid · alert(1) executes · // comments out whatever the page had left after your text. Same three-step grammar the lesson teaches: close it, end it, comment it.