Make sure the document format is Rich Text, not Plain Text.
In TextEdit on your Mac, format text with fonts and styles.
support.apple.com
When the format is Rich Text, the Format > Font menu should provide Bold and Italic styles that can be applied to a selected range of text. In fact, all the styling sub-menus should work when applied to a selection: bigger or smaller text size, fonts, etc.
To learn even more about TextEdit, click the Table of Contents link on the page linked above.