How to install Open JDK on Mac OS

Use SDK Man:

$ curl -s "" | bash

Follow the instructions on the screen.

$ source "$HOME/.sdkman/bin/"

Press ENTER.

$ sdk version
#should respond with sdkman 5.x ...

To install a JDK with it (this is OpenJDK 15):

$ sdk list java
$ sdk install java 15.0.1-open
$ sdk default java 15.0.1-open
$ sdk use java 15.0.1-open

You should use OpenJDK because by using Oracle you will have to pay a commercial fee, at least in commercial environments. This will eventually cause companies to abandon Java in worst case.