Use Trim Paths to animate strokes with precise control over exactly what part of the stroke appears at any moment.
Steps to use trim paths on shapes
Select your shape layer and go to Add → Trim Paths.

Animate Start and End values to reveal different parts of the stroke over time.

Tweak Offset to move the stroke around the path and change where it starts or ends.

One more thing
For looping animations, Alt/Option-click the Offset stopwatch and type: time * 100. It creates an endless rotation effect.
Related how-tos
How to animate strokes in After Effects
How to use merge paths in After Effects
How to round corners of shapes in After Effects
Need more help? Explore all our How-tos in one place.