In terms of being the most popular star of western films, yes, Cooper was there before Wayne, but there were major differences between the two as to style, as mentioned by others on this thread, and also the way they came up. Coop came up in the late silent-early talkie era, hit the ground running with the 1929 The Virginian, was a major star from that point on but not a superstar till 1936 and the twofer of The Plainsman and Mr. Deeds Goes To Town. Cooper went beyond being a cowboy star, became a sort of iconic All-American hero with Sergeant York-Pride Of The Yankees in 1941-42. From that point on till his death twenty years later he was like a demi-god in Hollywood even as his box-office was up and down.
John Wayne, interestingly,–to movie buffs like me–came up the hard way. While Cooper entered the scene as a gentleman, an aristocrat, whether out west or in the Foreign Legion, Wayne started out as a stuntman, small parts player, got a big break with The Big Trail (1930), which bombed, then spent the next nine years as a B cowboy star. John Ford’s casting of Wayne in Stagecoach changed all that, but even so, for the next decade Wayne was now just a mid-level action star at the level of, say, Randolph Scott, not too shabby but nothing iconic there, either.
When Howard Hawks cast Wayne as the ornery, stubborn Texas cattleman in Red River (1948) that changed everything: from that point on Wayne was a superstar, spent three years at the number one spot of box-office draws (a distinction Cooper never achieved); and his popularity, unlike Cooper’s was broader based, with Wayne specializing more in “common man” roles, or “common men called to greatness” roles rather than play more noble heroes of the sort that were Cooper’s stock in trade. Nobility just didn’t seem to agree with Wayne, and movie audiences apparently love him for it. He was a “one of us” kind of guy.
Anyway, I’ve probably gone on too long with this, the long and the short of it as I see it as that while Gary Cooper was Hollywood’s Cowboy Prince, somewhat above the fray, Wayne was the “Duke”, a rough and tumble guy who liked to fight, and who also liked to drink and chase women, something Cooper did more off-screen than on. I find it fascinating that retrospectively there seems to be little or no rivalry between the fans of these two screen legends, probably due largely to Wayne’s living fifteen years after Cooper’s death, the controversy that often swirled around him as a public figure in those years due to his conservative political views. For all this, Wayne still seems the popular favorite for a number of reasons too complicated to go into here. I think that his association with major directors John Ford and Howard Hawks are a major factor in this, as both directors are still highly regarded, while Cooper, who also worked with many major directors, is more associated with men like William Wyler and Cecil B. DeMille (read: old school). Every little bit helps.