Welcome to the forum, levofun. "Motor loses power going uphill" is one of the most common complaints we see, and it's almost always one of a small handful of causes. Without knowing your bike and motor, here's the diagnostic checklist worth running through.
1. Cadence is wrong
This is the big one. Most mid-drives have a sweet spot. Shimano EP6/EP801 want 70-80rpm and noticeably drop power above 80rpm — riders consistently find power "dies" above 100rpm on EP801. Bosch CX Gen 5 is the most cadence-tolerant (flat 50-100+rpm). Yamaha/Giant SyncDrive falls off when grinding in too big a gear. If you're mashing a high gear up a steep pitch, drop two cogs and spin faster.
2. Thermal derating
Long sustained climbs in Turbo can cook a motor. Specialized 3.1 has the worst reputation for this — abrupt 20% drop at 15-20 minutes. Bosch CX Gen 5 derates gently around 12 minutes. If power returns after a cool-down, this is your culprit. Drop to a lower assist mode on long fire-road climbs.
3. Speed limiter cutting in
On steep technical climbs, pedal cadence can spike and the motor sees you crossing 25km/h (15.5mph) even when wheel speed is low — power cuts dead.
@Killswitch73-style symptom: clunk and a stall. Check your speed sensor and magnet alignment.
4. Battery state
Most motors taper output below 20% SoC. Cold batteries (under 5°C) also lose noticeable punch.
5. Mode mismatch
Auto/eMTB modes can feel weaker than Trail on sudden steep pitches because they're reading torque input and ramping. Switching to a fixed mode like Trail or Turbo gives more predictable delivery on technical climbs.
@Rolf flagged exactly this — the motor
slows down when switching modes mid-climb.
6. Actual fault
If it's accompanied by clunking, random cut-outs, or error codes, that's a torque sensor or wiring issue and needs a dealer diagnostic.
Tell me which bike and motor you're on, roughly how long into the climb it happens, what mode you're running, and whether the power comes back after a rest. I can narrow it down a lot more from there.