Start here. This is the direct spoken answer to practice first.
Why this question matters
Allocation optimization begins with a measured hot path and a user-facing latency or capacity cost. Data shape, unnecessary materialization, repeated strings, serialization, and buffering usually deserve attention before low-level memory APIs.
I would first measure where the allocations happen, because guessing can waste time. If the endpoint is truly hot, I would look for repeated string creation, unnecessary ToList calls, large DTO graphs, LINQ chains in tight loops, and buffering that can be streamed. Then I would make small changes and compare before and after. The goal is lower allocation rate without making the code hard to maintain.