I had a bunion surgery. Which exercise is best for getting rid of stiffness?

Stiffness. The very best thing to do is see your surgeon. None of us know what type of bunion surgery you had or when it was done as none of that info was presented.
Gentle motion. The stiffness can last up to a year in some cases. I know, because i, too, had bunion surgery. If you do gentle range of motion and muscle strengthening exercises and do not injur the area it could lose the stiffness in about 4 months as long as you are healthy.
Toe Raises. Gentle toe raises starting in the 3rd week post op, once the stitches are out. And walking.