In the Lewis structure notation, brackets are typically used when there is an ion or a polyatomic molecule. In the case of hydrogen cyanide (HCN), which is a linear molecule, brackets are not necessary.
The Lewis structure you provided for hydrogen cyanide, "H—C≡N," correctly represents the bonding between the atoms. Hydrogen cyanide consists of a hydrogen atom (H) bonded to a carbon atom (C) through a single bond, and the carbon atom is also triple-bonded to a nitrogen atom (N).
Since hydrogen cyanide is a neutral molecule and not an ion or a polyatomic species, brackets are not required in the Lewis structure. Therefore, you can represent it as "H—C≡N" without the need for brackets.