To have second thoughts about something/ To think better of something:
To change your mind after assessing the situation.
The cat had second thoughts about jumping onto the furniture.
The cat wanted to jump onto the furniture, but thought better of it.