The most common reason is plugin incompatibility with the new version of wordpress. The first thing you can try is to disable all wordpress plugins.
You can do this through the database:
UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';
There is an easier way, if you don’t want to use sql. You need to rename the plugins folder via FTP like plugins_disabled or something else.
When wordpress cannot find the plugins folder, it will disable active plugins.
After that, the admin panel should be available. You will need to enable plugins one at a time to understand which one has stopped working.