Kevin James was a writer on Everybody Loves Raymond before he got his own show, The King of Queens, and the friendly relationship between the two shows meant that they got to crossover on multiple occasions, and you can watch them all in this compilation.
Doug (James) met Ray (Ray Romano) at the DMV when Ray tried to get him to help him cheat on a driver's test, and even though that ended badly for Doug, they somehow remained friends ever since. They've done everything from golfing to clubbing together.
King of Queens (1998-2007) and Everybody Loves Raymond (1996-2005) are both streaming on Peacock.
Andy Hunsaker has a head full of sitcom gags and nerd-genre lore, and can be followed @AndyHunsaker if you're into that sort of thing.