Configuring a Windows Paging File

Windows 10 and Windows 11

Control PanelSystem and SecuritySystemAdvanced system settingsAdvancedPerformanceSettings…AdvancedVirtual memoryChange…

Either check Automatically manage paging file size for all drives, or increase the Custom size value, or check System managed size.