I would achieve this with paragraph styles, though it doesn’t so much give you an empty box so much as a colour-filled one.
Create a paragraph style that includes a paragraph rule. You can use Rule Above or Rule Below (doesn’t matter which as you can adjust the position of either up or down using the offset section of the dialog box). Make the rule the colour you want and increase its weight until it is the size you want. By tweaking the weight and the offset with “Preview” turned on, you can get whatever size you want.
Set the width 0f the rule to “Column” and I would suggest indenting the paragraph on both sides so that the coloured background sticks out from the text a little on each side. I would also set the space before and after the paragraph so that previous and following paragraphs are clear of the coloured background of this paragraph. Since you want the text of this paragraph bold, set that in the Basic Character Formats part of the dialog box. Name the paragraph style appropriately (say “Heading highlight”) and then apply it whenever you want to turn a paragraph into a heading with a coloured box.
I would also suggest that you set the indents on each side of the other paragraphs to same sizes so that the text looks uniform throughout your document.
Somewhere on this web site some time ago there was an article about using paragraph rules above and below in combination to achieve all sorts of interesting effects but I haven’t had time to hunt for it. I seem to recall that it suggested using Japanese dots for one rule (say rule above) with the width set to “Column” and solid for the other (say rule below) with the width of the latter set to “Text”, both of them in the same colour, giving the effect of a coloured box with rounded corners. Very clever.