A family of Microsoft word processing software products for creating web, email, and print documents.
This is another example of Microsoft's own documentation not acknowledging the fact that Office for Mac & Office for Windows are not the same even though they insist on alluding simply to "Microsoft 365", "Word 2016" & "Word 2019". The DisplayBarcode field is supported only in the Windows product.
The equivalent field in Mac Word is BarCode. You'll find it in Insert> Field - Numbering along with the supported switches available by using the Options button in that dialog.
Use the Send Feedback icon at the right end of a title bar to send a nastygram to the development team & refer to that article.