Unity is always 3D, and can use 3D visuals, but you may need to get creative to combine them with a 2D setup. But if you don’t want to use 3D for technical or aesthetics, you can do it in other ways. Here are three:
1) sprite animation, as used in your example. You need to draw the animation as sprites, and trigger the correct one. See beginner tutorials on how to do sprite animation. This was used by the example you gave.
2) skeletal 2D, combines bones, i.e. the net is made out of parts which are animated using a rig of bones. See beginner tutorials on this technique. The advanced variant uses a deformable mesh based on a sprite, that is also hooked up to bones.
3) 2D physics based, which can be done (maybe!) using net parts connected with joints. Search for unity + 2d + rope to see tutorials how to make this in Unity.
The animated versions require game mechanics that can detect hitting the hoop and net, probably from at least two sides (two trigger colliders) and going through (third trigger collider) to play the correct animation. You anyway need them, to detect that the ball goes through from above, but not from below etc. It seems simple, is fairly intricate, but manageable.