Check your metadata file format. It must start with the ffmetadata header line and contain CHAPTER blocks each with a timebase, start, end, and title.

Run ffprobe on the output file and look for a chapters section.

Re-run ffmpeg with the metadata file as the second input and add the option that maps chapters from that input, keeping the video and audio mappings explicit.

Avoid a second re-encode afterwards. If you must trim or remux, include the chapter copy option so chapters are carried over.

Open the final mp4 in a player that shows a chapter menu and jump between chapters.