You should ask the conference committee whether the book chapter is considered a "first publication" of the material. If it isn't then you need to be careful about what you say in the chapter and also be careful to cite it to avoid a charge of self-plagiarism.
A talk available on YouTube, might have issues and be considered a prior publication, for example.
But, your description seems to imply that it may well be a first publication, if there is no way for non-attendees to know what you said and to cite it themselves. In that case, it would be enough to consider the book chapter as "the publication" and the talk as "a discussion of the key ideas in the publication", even though the talk precedes the formal publication.
This probably varies by field, actually, and you might also want to ask a colleague/advisor about the standards of the field.
As to how different they must be, it is likely that the committee is already comfortable that you will be describing the same ideas as in the talk and not an extension. Again, I draw the inference that the chapter is "the publication" and the conference talk was "about the publication".
I hope that isn't too confusing. But you would do well to ask both the conference chair or whoever invited you to submit a chapter, as well as a colleague or advisor if available.