You're describing Slither.io (2016, by Steve Howse).
If the game was 3D or had distinct "teams," it might be Snake.io or a Snake Battle variant, but Slither.io is the iconic green-trail/pink-snake match.