7-speed cassettes are seldom seen since the 1990's and first you want to check if you actually have a cassette or if it's a freewheel. A freewheel contains the ratchet and threads onto the hub, usually with 13 or 14 teeth in the small cog, while a cassette slides on to a ratchet that's part of the hub and usually has 11 or 12 teeth in the small cog.
Freehubs all use the same spline pattern but they are different overall width. 7 speeds were narrower. 8, 9, 10, and mountain 11 all go on the same width. Road 11 is wider. So to put a 7 speed cassette on a road 11 speed wheel you need some spacers, and you can't put an 11 speed cassette on a 7 speed hub.
__________________
Genesis 49:16-17
"Well, well!" said Holmes, impatiently. "A good cyclist does not need a high road. The moor is intersected with paths and the moon is at the full."