If you have Java and its set up correctly it will work on double click like any other app.
Are there any installer logs in the folder where you ran the installer?
Having an M1 has screwed you here.
Apple changed their graphics API without providing backwards compatibility and no existing version has the updated version of GLFW.
Try removing Optifine.
If that doesn't work, provide debug.log without Optifine (more details on debug.log in my signature below, just expand the spoiler)
I've split your response into its own thread.
Please provide debug.log (more info on where it is and how to provide it in my signature below, just expand the spoiler)