The Shimano CS-HG31-8 is the suitable cassette for 8-speed groups.
Product features - Shimano CS-HG31-8
Use: MTB / Trekking
Model: CS-HG31-8
Type: Hyperglide
Gear: 8-speed
Compatible chain: HG/IG 6/7/8-speed
Gradation (choose variant)
11-32 (11-13-15-18-21-24-28-32 teeth)
Material
Steel