Currency Peg and Interest rates

can someone pls confirm my understanding about the peg and the interest rates.

if a country’s peg is likely to break, we say that the interest rate will likely be higher. Do we mean that they need to raise the interest rates so that people invest and the current doesn’t depreciate and stay closer to its peg price?

Yes.

As long as they are credibly fixed, the YC will remain same in both countries (atleast they are engineered that way)

Now if there is speculation in its credibility, the weaker currency better raise the interest rate in order to stop withdrawals.