Minecraft 1.20.2 requires Java 17 to work - currently you are using Java 21
After installing Java 17, replace the word java in your script with the Java 17 path - put it into quotation marks
For example:
"C:\Program Files\Java\jdk-17.0.9\bin\javaw.exe" -Xmx2048M -Xms2048M -jar forgeserver.jar
pause
Also make sure the forgeserver jar file name it matching
If you are using 1.20.2, add 1.20.2 mods and do not mix it up with 1.20.1 mods