Hi!
I realize I'm not posting this correctly, but I spent many hours trying to fix my problem and couldn't reply to the actual thread that discussed this problem. I've come across probably over a hundred posts on this issue and nobody posted what helped me solve the problem.
Octopi couldn't connect to my WIFI, but it would connect to my phone's hotspot and it would also work with an ethernet cable. The solution was to change my router's SSID and password to exactly my phone's network details. This way it would connect to my router and then I would change the SSID and password back to what my router originally was. On my Octopi I changed the details with $ sudo raspi-config but I believe it would have the same effect if you did it through the text file in the /boot folder or reflashed it with Raspberry Pi Imager.
I know that it's got nothing to do with 2.4/5 GHz bands or any other proposed solutions because in the beginning it worked for 2-3 weeks and one day it just stopped connecting for no apparent reason and this was the only fix that did it for me. If anybody feels like posting this in any of the relevant threads, please do so, because I cannot and I just created this account to maybe help somebody else save a couple of hours of frustration.