If you are using Laravel Passport you might be missing its key on the storage folder:
https://laravel.com/docs/8.x/passport#deploying-passport
You'll need to run this on your server:
php artisan passport:keys
The weird thing to me is that it was using a temp folder as the app's storage. Might be something from Heroku, or serverless I am not aware of.
One other detail: composer didn't fail on installing the dependencies, it failed on executing the post-autoload-dump script. So your dependencies might be installed correctly.
If you need to recreate passport keys on every deployment you can add the above command to your composer.json file post-autoload-dump script (look under the scripts key)
But I don't think that is a good idea as it would invalidate all previous tokens on each deploy.
As I am not familiar with Heroku, or Serverless, I don't know how to workaround having your app's storage as a temp folder on the server.