In November 2016, when the cookbook author Yasmin Khan returned to her home in London after the olive harvest in the Israeli-occupied West Bank, she faced a problem: No matter how strenuously she tried, she could not write.

Her manuscript for a book on Palestinian cooking was due the next spring. But images of the Israeli military checkpoints and soldiers she’d seen throughout her travels in the West Bank and Gaza crowded her head. As a writer, she felt uncharacteristically timid, fighting an impulse to self-censor before her words reached the page.

“I felt really disturbed by what I saw,” she recalled recently in New York. “I also felt , ‘What on earth am I doing, writing a cookbook? Isn’t this really frivolous?’”

She worked through the impasse by revisiting the writing of Anthony Bourdain, whose bracing words energized her. She gave herself a pep talk: “Stop trying to sanitize, or make something pretty, when it’s painful.”