I had a Java 19 VM installed with homebrew, but it seems it was installed as openjdk not openjdk@19. Another brew install (ffmeg seeing as you ask) decided to upgrade openjdk, which upgraded my 19 to 20.
Now I cannot find anywhere to download a version 19 JVM, and Gradle will not build with Java 20 ;-(
$ brew list
...
openjdk
openjdk@17
...
$ brew install openjdk@19
Warning: openjdk 19.0.2 is already installed and up-to-date.
To reinstall 19.0.2, run:
brew reinstall openjdk
https://www.oracle.com/uk/java/technologies/downloads/ has only versions 17 and 20 to download.