Your code is almost complete. Please give the revised script a try.
Microsoft documentation:
Sub ContentsFrmBookmarksWLinks()
Dim bookmark As bookmark, linkText As String
With ActiveDocument
' Add a page break to separate from the existing content
.Characters.Last.InsertBreak wdPageBreak
' Add a title to the new section
.Paragraphs.Last.Range.Text = "List of Bookmarks:"
' Loop through all bookmarks in the document
For Each bookmark In .Bookmarks
.Characters.Last.InsertParagraphAfter
' Get the bookmark name
linkText = bookmark.Name
' Create a clickable hyperlink to the bookmark
.Hyperlinks.Add _
Anchor:=.Paragraphs.Last.Range, _
Address:="", _
SubAddress:=linkText, _
TextToDisplay:=linkText
Next bookmark
End With
MsgBox "Bookmark list with links created."
End Sub