She brags about being beautiful.

Literal

She [topic-は] beautiful thing [object-を] is-boasting.

ことを自慢する — the nominalizer こと converts '(being) beautiful' into a noun that becomes the object of 自慢する ('to boast about'). The construction expresses bragging about a quality or fact.