Modify entity attributes: base value, get, modifiers. Java Edition only.
The /attribute command reads and changes entity properties: health, speed, damage, scale and other stats.
Attribute ids have changed over time. Before 1.21.2 they began with a generic. prefix; from 1.21.2 that prefix was removed. The tool inserts the correct form for the selected version.
The command is Java-only — Bedrock has no equivalent.
Choose the target and the attribute.
Pick an action: read the value, set a base, or add a modifier.
Set the value and, for a modifier, the operation and its id.
Copy the command.
You are probably on a version where the id differs. Look at the “For the selected version” line under the settings — it shows the correct id.
It lets you apply several modifiers to one attribute and later remove a specific one without touching the others.