I use this command:
"C:\Program Files\Epic Games\UE_5.2\Engine\Binaries\Win64\UnrealEditor.exe" "C:\MyProjectFolder\MyProject.uproject" -run=DerivedDataCache -fill
you can add -ddc=noshared
to the end if you are working on the project alone and using one pc