Joomla not working (it was working before)

I managed to fix the error myself,

here is how to fix it;
go to htdocs/libraries/src/Filesystem/Folder.php
and delete the set_time_limit functions (the whole line that function is being used)

then go to htdocs/administrator/components/com_scheduler/src/Scheduler/Scheduler.php
search for “// Let’s try to avoid time-outs” and delete the whole “if” function.

this should work if you installed joomla from softaculous and getting this error.