Stock-Based Compensation - Summary of Stock-Based Compensation Expense (Details) - USD ($) $ in Thousands  | 
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2023  | 
Dec. 31, 2022  | 
Dec. 31, 2021  | 
|
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | |||
| Total stock-based compensation expense | $ 93,636 | $ 69,070 | $ 26,932 | 
| Research and development expenses | |||
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | |||
| Total stock-based compensation expense | 73,160 | 49,713 | 19,426 | 
| Selling, general and administrative expenses | |||
| Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] | |||
| Total stock-based compensation expense | $ 20,476 | $ 19,357 | $ 7,506 | 
| X | ||||||||||
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
  | 
| X | ||||||||||
- Details 
  | 
| X | ||||||||||
- Details 
  |