Cant download any mods to minecraft

yeah im starting to give up at downloading something into minecraft im pretty sure nothing really works anymore

What steps are you taking and what happens? Can you share some screenshots?

normal steps. java is opening as a file not as a operation. meaning i cant even get java on my computer in the first place. same as optifine it opens as a file aswell. if i try to download java from the web and open the file and click java.exe or something like that it just says this can’t be run on endless. is there any other way