This is called unlinking. Graham Mayor has examples on his site.
Microsoft Word Tips by Graham Mayor, MVP
Code:
Sub UnlinkAllStyleRef()
' Unlink all StyleRef fields in a document, even if in headers/footers or textboxes
' Based on code at Installing Macros by Graham Mayor, MVP
' Charles Kenyon
' 3 December 2020
'
Dim oStory As range
Dim oField As Field
'
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
If oField.Type = wdFieldStyleRef Then oField.Unlink
Next oField
'
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
For Each oField In oStory.Fields
If oField.Type = wdFieldStyleRef Then oField.Unlink
Next oField
Wend
End If
'
Next oStory
'
Set oStory = Nothing
Set oField = Nothing
End Sub