I managed to fix the problem with a solution i found online.
The problem was that the update had failed.
I went to the wp-content folder and I saw a “upgrade” folder. Then I replaced everything from that folder to the htdocs folder (not the wp-content though). So basically i manually continued the update. Also I deleted the
.maintenance file and the site started working like normal with the new wordpress version.