I bought Minecraft java edition a few days ago and nothing is wrong with it except when I try to play a version of Minecraft older than 1.13. I have already tried deleting options.txt, and it doesn't work and reappears while the launcher still gives me the same error (an unexpected issue occurred and the game crashed). I am also using openjdk. Could that be the problem?
Minecraft versions prior to 1.13 require Java 8 to run (aka newer versions of Java won't work). That's probably your issue.