My opponent told me that I should castle but block me immediately after this defeat

He was wrong to assert that he would beat you easily if you didn't. All it took was a little inaccuarcy on his part and you were off to the races.
https://www.chess.com/forum/view/general/always-win-without-castle-the-most-satisfying-victory