der Strick
rope
A thick, strong rope made of twisted fibers.
Er befestigte die Plane mit einem dicken Strick am Baum.
He fastened the tarp to the tree with a thick rope.

rope / knitwear
Loading your saved state.
rope
A thick, strong rope made of twisted fibers.
Er befestigte die Plane mit einem dicken Strick am Baum.
He fastened the tarp to the tree with a thick rope.

The noun 'der Strick' (rope/knitwear) is related to the verb 'stricken' (to knit). This connection explains both main meanings: a rope made of twisted or "knitted" fibers, and a knitted item of clothing.
Sie hat mir einen Schal gestrickt.
She knitted me a scarf.
The idiom 'wenn alle Stricke reißen' (if all else fails) introduces a subordinate clause. It describes an emergency plan or the last remaining option. The main clause follows after it.
Wenn alle Stricke reißen, kann ich mir immer noch Geld von meinem Bruder leihen.
If all else fails, I can still borrow money from my brother.
The use of 'Strick' (knitwear) for an item of clothing like a cardigan or sweater is colloquial. You often hear it in everyday life, but in formal texts you would tend to avoid it.
Nimm dir einen Strick mit, es könnte später kalt werden.
Take some knitwear with you; it might get cold later.
To distinguish the meanings, pay attention to the context. If it is about fastening, tying, or pulling, a rope is meant. If it is about clothing and warmth, a knitted item of clothing is meant.
Kannst du das Paket mit einem Strick zubinden?
Can you tie up the package with a rope?
leash / line
'Leine' and 'Strick' can both mean a long, flexible thing made of fibers. 'Leine' is used especially for specific purposes: for a dog, for hanging up laundry, or for tying something up. 'Strick' refers more to a thick, twisted rope and often sounds simpler or more practical/manual. The words can be confusing because both can be used for tying or holding something. With a dog or with laundry, people normally say 'Leine'. If the material is thick and made of twisted fibers, 'Strick' may be more precise.

Frau Klein band den alten Karton mit einem festen Strick zusammen.
Mrs. Klein tied the old cardboard box together with a strong rope.
Bei der Arbeit hat das Team kurz überlegt, ob der Hund im Büro an die Leine muss.
At work, the team briefly considered whether the dog in the office needed to be on a leash.