Cage length is basically the determining factor in derailleur capacity. This is the amount of chain it can tension that makes up the difference between the chain length needed for the smallest combination of gears and the largest. Obviously this gets a little more complex with 2x, 3x system but not outrageously.
For a 1x system simply subtract the number of teeth on the smallest cog from the Number on the biggest. This is your tooth difference. Now check the derailleur manufacturer for the ‘capacity’ of the mech you’re looking at. If this is the same or bigger than the tooth difference then all good. If not, you need a longer cage. This is almost a non-issue in 11sp but a genuine consideration in 10sp due to derailleur design.
This isn’t all there is about combining bigger than intended cassettes with derailleurs: there is potential for geometry of the mech to cause fit problems, but no one seems too keen to publish this information when selling cassettes unless they also want to sell things to fix s fit problem.