The Cheese Touch is a superstition from the book *The Cheese Touch* by T.S. "Tom" Schulman. The Cheese Touch is a contagious curse that is supposedly passed on by touching a certain piece of cheese.
It's possible you might be thinking of another story or maybe a fan fiction that features Greg Heffley and the Cheese Touch, but it is not a part of the original *Diary of a Wimpy Kid* books.