A cloud-based task management app from Microsoft that helps users organize and manage daily tasks across devices.
The message does not identify the exact cause, so I suggest first testing with a small file, such as a PDF or image under 1 MB. Microsoft To Do accepts different file types, but attachments are limited to 25 MB for each task, including files already attached to that task.
For more details, please refer to: Add files to your tasks
You could also update and restart Microsoft To Do, then sign out and back in. Testing the same file through the https://to-do.office.com may help determine whether the issue is limited to the app. If you are using the web version, you could try clearing the browser cache or opening Microsoft To Do in a private browsing window.
If you are connected through a VPN, proxy, corporate firewall, or restricted network, you may want to disconnect from it temporarily or test using another network. These network controls can interfere with Microsoft To Do synchronization and file uploads.
For more details, please refer to: Error messages in Microsoft To Do
As an alternative, you could upload the file to OneDrive and paste its sharing link into the task’s Add note section.
I hope this helps clarify the possible causes and the troubleshooting steps you can try.