The likely culprit is a mismatch between JSON syntax and the front-matter syntax used earlier in the tutorial.
The two syntaxes look similar but aren't interchangeable. Front matter (the --- block at the top of an .md or .html file) is YAML, so unquoted keys like layout: layout.html are fine.
A posts.json file is actual JSON, which requires double quotes around every key and string value, and no trailing commas. If it was typed the same way as front matter, { layout: layout.html } then that's invalid JSON and Eleventy either throws a parse error or silently fails to apply it, which matches what you're describing (title not filling in, index not building).
Here's a working reference setup:
posts/posts.json