occurs when several words that are close together all begin with the same consonant sound.

The literary device you are referring to is called alliteration.

The literary device that occurs when several words that are close together all begin with the same consonant sound is called alliteration. Alliteration is a technique used in writing to create rhythm, emphasize certain words or phrases, and enhance the overall musicality of the language. It is commonly used in poetry, slogans, advertisements, and even in everyday speech to make phrases more memorable and impactful.