Formation of GW190521 from stellar evolution: the impact of the hydrogen-rich envelope, dredge-up, and 12C(α, γ)16O rate on the pair-instability black hole mass gap