I didnt make the same moves
Draw by Repetition

The moves don't matter. It is repetition of a position, not moves. If a position has occurred three times irrespective of the sequence of moves leading to it, it is an automatic draw according to chess.com rules (according to FIDE rules, a draw can be claimed).

I assume you mean this game: https://www.chess.com/game/live/101444117042?username=huntermascroft
The final position has been repeated three times, hence the draw.
So I was trying to get checkmate by castle, I was 1 move away when it was draw by repetition.
I always remember repetition as when YOU and the opponent make the say move 3 times, but I didn't do that, why opponent did make the same move 3 times though, this never has happened to me, what's going on?