how can i anchor a point of a sprite to make it swing?

hi everyone, i have a question… how can i anchor a point of a sprite to make it swing? i mean something like a rope or like a pendulum…thank you for your answers!

Look for Rect transform pivot