the hamburger dates back at least to the late 19th century, while the earliest appearance of anything resembling a grilled cheese sandwich is from 1902, so clearly the hamburger came first.