Give yourself unlimited choices and you'll freeze. Give yourself three notes and a 4-bar phrase and you'll find ideas you'd never have found otherwise.
Constraints are not limitations on creativity — they are the substrate of it. A blank page is paralysis. A blank page with a rule is a starting point.
This is why writing in someone else's form (a sonnet, a fugue, a haiku) often produces better work than "write whatever you want."
Related: transcription-practice, ↗ @alice / writing-is-thinking