When you are cooking, you try to find combinations that taste well together but there are just so many combinations of food to try. You test different things until you find something that works and you remember it for later. As you build up your repoitore of food combos, you have created patterns in the way you approach your cooking. You might even take inspiration from famous food combinations from chefs from the past, aiding in your own ideas. By following these patterns that you have learned as you were cooking, you find ideas quicker and your expirience creates a better experience for yourself.
Coding is just like cooking: by using recipes that have been established before you can give yourself a framework to work from that will help you solve problems more efficiently. As an example, in game developent the Observer pattern is often used to solve problems such as event management and ui updates. By following the observer pattern, I am able to solve certain problems during game development more efficiently and lets me focus on design aspect more as a result.