The correct change that needs to be made in the sentence is to change "then" to "than."
The corrected sentence would read: "I learned that cooking takes more patience and attention to detail than I had ever dreamed!"
The word "than" is used for comparisons, while "then" indicates time, so "than" is the appropriate word in this context.