A fortune cookie was a type of cookie from Earth that contained a piece of paper with a "fortune" inside. They were often served in Chinese restaurants.
Gabriel Lorca claimed his family made fortune cookies in the 22nd century, and Lorca kept a bowl of them in his ready room on the USS Discovery. In 2256, he offered one to Michael Burnham as a symbol for the possibilities of working on his ship. (DIS: "Context Is for Kings")
When the Discovery returned from the mirror universe and Lorca's deception was revealed, Admiral Katrina Cornwell used a phaser to vaporize Lorca's bowl of fortune cookies in anger. (DIS: "The War Without, The War Within")
After assuming temporary command of Discovery in 2257, Captain Christopher Pike found a fortune cookie message at the base of Lorca's desk that read, "Not every cage is a prison, not every loss is eternal." (DIS: "Brother")
The wording of the fortune cookie found by Pike in 2257 was intended as a specific reference to the future fate of the character, and the use of the word cage is a reference to "The Cage". (DIS Season 2 DVD and Blu-ray, Audio commentary on "Brother")