“To cook up” can mean just to cook some food, especially for others.
“Sarah cooked up a feast for us.”
It can also mean to plan or invent something, usually something a little dishonest.
“Jerry cooked up an excuse for being late.”
“Mary cooked up a scheme to cheat her employer.”