OK, that was very helpful.
It may not look like it, but this is the cause of the error:
Alternatives for TaskScheduler.h: 
-> candidates: 
This is telling you, in a cryptic manner, that your program had an
#include directive for the file
TaskScheduler.h and the IDE was not able to find any library that provides a file of that name.
So you'll need to install the library. I see there is a library of that name in the Arduino Library Manager. If that's the one your sketch was written for, then it can be installed easily:
Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.
"Filter your search" field, type the library name.
You should now see "TaskScheduler by Anatoli Arkhipenko" listed in the library search results. Click on it.
button. The library will now be installed. INSTALL
You may now get a dialog asking you:
Would you like to install also all the missing dependencies?
If so, click the
button. Install all
Wait for the installation to finish.
I'll add some information about the, in my opinion, poor user experience currently provided by the IDE in this common situation where a library dependency of the sketch has not been installed.
In the classic IDE, you would have also gotten a more intuitive and familiar error message like this:
fatal error: TaskScheduler.h: No such file or directory
exit status 1
TaskScheduler.h: No such file or directory
This issue is being tracked here:
08:22PM - 20 Mar 21 UTC
The STDERR output from arduino-cli is not shown in the Output panel during compi