What are the things one should consider when invited to contribute a book chapter? What are the things one should consider, as a postdoc, before accepting or rejecting an invitation to contribute a book chapter? The proposed book is a handbook in a developing field of engineering.
It almost certainly won't earn you any money.

It probably won't be read by many people. It will be cited by even fewer.

The collaboration may lead to future projects together.

It may involve a lot of work.

You might enjoy the process. Or hate it.

It may or may not help your career progression, depending on your field, your career to date, and the posts you apply to. If it's a book that will become a standard for one or more taught courses, your contribution may be crucial for your future teaching career.

In this particular case, when the putative author is a rising young authority in an engineering field, it's a rapidly-developing field that's attracting significant international interest, and many universities are introducing new courses in the area, then, (depending on the publisher, the other authors, and the other chapters) there's potential for the book to have quite a significant audience, so contributing to the book chapter would be attractive.