Please never anywhere share screenshots of text if you only want to share the text and not something additional like colors or IDE annotations. Text in images is hard to read, especially on mobile, very hard to copy, and nearly impossible to search for.
Regarding your issue, while you say you use Gradle 8.10, you are most probably not.
Because the error you get you usually get when running a Gradle version that does not support running on Java 22 using Java 22.
What Gradle version you have installed locally, if any, is irrelevant and in most situations you even do not need any Gradle version installed locally. Any project should have (I consider those that don’t as having a build bug) the four Gradle wrapper files included that control which Gradle version is used to run the build.
As your screenshot is showing gradlew is used, this also is the case here, and your Gradle wrapper files most probably define a Gradle version to be used that does not support running on Java 22.