Web animation expert Sarah Drasner lays out her recommendations in this video. TLDR: Use CSS animations for simple interactions and JavaScript (e.g. GSAP) for everything else.
I've seen some impressive animations with pure CSS, but there isn't much reason to bother doing that when libraries like GSAP are easier to use and just as performant.