Why doesn’t Java (Arm64) install on my MacBook Air M4?

I’m setting up a brand new MacBook Air M4 and trying to install Java using the DMG file from Oracle.

The installer doesn’t even start. I get the error shown below.

And yes, I’ve already made sure it’s the correct file (for Arm64, not Intel).

Does anyone have a clue what might be going on?

Or should I try using Homebrew instead? (I haven’t installed it yet.)

enter image description here