Java 26.2
Effects
Speed
Apply to @p
/effect give @p minecraft:speed 30 0 false
Give and clear
Two things trip people up with /effect: the amplifier is one lower than the level shown in game, and the duration is in seconds, not ticks, which is the opposite of potion item data. Set both visually here, use the infinite keyword where the version supports it, and hide the particles when the effect is a game mechanic rather than a visual.
Speed for 30 seconds
/effect give @p minecraft:speed 30 0 falseDuration is in seconds; amplifier 0 is level I.
Strength II for 2 minutes
/effect give @p minecraft:strength 120 1 falseAmplifier 1 shows as level II in game -- the off-by-one that trips most /effect commands.
Invisible buff without particles
/effect give @p minecraft:night_vision 600 0 truehideParticles keeps mechanic effects from swirling on screen.
The amplifier is zero-based: amplifier 0 is level I, amplifier 1 is level II, and so on. So Strength II is amplifier 1. The editor shows the in-game level and writes the correct amplifier for you.
Use the infinite duration option, supported on Java 1.19.4+ and current Bedrock. On older versions there is no infinite keyword, so the generator falls back to the maximum practical duration (1000000 seconds).
Seconds — the opposite of potion item data, which uses ticks. /effect give @p speed 30 1 grants 30 seconds of Speed II. This tick-vs-second mismatch is the most common /effect error.
Enable hideParticles. The effect still applies but shows no ambient swirl, which is what you want for game-mechanic effects like Night Vision or Saturation used behind the scenes.
Java 26.2
Apply to @p
/effect give @p minecraft:speed 30 0 false