Minecraft wiki entry for Target_selectors, associated text: Examples in Java Edition:
@a[level=10] — Select all players who have exactly ten levels.
@a[level=8..16] — Select all players who have between eight and 16 levels (inclusive).