Switch to Composer: "Return type of SendGrid\ReplyTo::jsonSerialize()"

Your software
My Mautic version is: 4.4.6
My PHP version is: 7.4.33
My Database type and version is: MySQL 8.0.32

Your problem
My problem is: For activating the Marketplace, I am trying to activate the composer with this explanation: How to Switch to Composer
While executing this command (composer create-project mautic/recommended-project:^4 html-new --no-interaction) the following error is shown

These errors are showing in the log: “Deprecated: Return type of SendGrid\ReplyTo::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/sendgrid/sendgrid/lib/helpers/mail/Mail.php on line 77

Steps I have tried to fix the problem: I tried to edit the Mail.php, but to be honest, as a rookie on php I have not been succesfull.

Thank you for some hints, about what I am doing wrong.