→Only when I had another failure I realize knowledge is valuable.
→It was only when I had another failure I realized knowledge is valuable.