Locate php.ini. For Debian this file is located in:
/etc/php/7.4/apache2
Search for the following configuration lines (in nano use CTRL+W for search) and replace the existing configuration values with acceptable values.
max_execution_time = 60
memory_limit = 128M
post_max_size = 64M
upload_max_filesize = 64M
max_input_time = 60
file_uploads = On
safe_mode = Off
Locate .htaccess file in the root of your wordpress directory and add or adjust:
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
When you open the media library in WordPress and try to upload a file it should reflect the maximum configured upload file size: