Oscar Piastri scored his first Formula 1 grand prix pole position after dominating qualifying at the Chinese Grand Prix.