I was wondering the same thing, based on Erik's post.
I'll try to summarize. The first thing you need to figure out is whether you are keeping your wheels and what type of freehub body you have on your rear wheel for cassette compatibility. This article by Enve has some very good info on the freehubs available.
FREEHUBS EXPLAINED: WHAT ARE XDR AND MICRO SPLINE?
If you indeed would like to keep your wheels, you need to find out if the hub manufacturer has a freehub body available for the type of cassette you want to run. For example if your wheels currently have an XD driver, you need to find out if there are parts available to convert it to a Shimano hub. Let's say you have DT Swiss hubs, you would go this page on their website to figure out how to convert their hubs to Shimano:
DT SWISS Conversion Charts. If you are looking to convert into a Shimano 12 speed, this requires a MicroSpline freehub body. Since this is a proprietary standard, there are very few conversion kits available (DT Swiss being one of the few available). That's why the Deore 11 speed cassette in 11-51 is so attractive, cause you can use your Shimano hub or (usually) find a conversion kit to run it and thus keeping your wheel. (Edit: Some SRAM drivetrains that don't use a 10T cog work with Shimano freehubs, so if you are running an older SRAM drive train you may already have a Shimano hub, and you should be set if going 11 speed.)
Once you have this figured out, you would need a shifter, rear derailleur and chain to go with cassette (in this case all Shimano, unless you want to get into mulleting). You could potentially keep the cranks if the chainline of your current cranks is similar to the one recommended for the drivetrain. If you have third party cranks like RaceFace\Easton\FSA you can check to see if they have chainrings that could work with the existing crank. If a new crank is needed, you can keep the bottom bracket if the spindle diameter is the same. If not you will need a new bottom bracket. For example, if you are currently running SRAM GXP cranks (24-22mm) and want to go to Shimano cranks (24mm) you will need a new BB. If your brakes have an individual brake to bar mount, you can probably keep them. If using integrated brake and shifter clamps, scratch you head and read this
mbr explains… Integrated brake and shifter clamps.
Hopefully I didn't miss too much in the above summary.