How may I resolve an error "Packaging Failed"

I wanted to build a ready-made game, but when I wanted to do it, I get…

  • UATHelper: Packaging (Windows (32-bit)): ERROR: Unable to create
    directory ‘C:\Program Files\Epic
    Games\UE_4.22\Engine\Intermediate\Build\BuildRules\UE4Rules.dll’
    for intermediate assemblies
    (Exception: Odmowa dostępu do ścieżki
    „C:\Program Files\Epic
    Games\UE_4.22\Engine\Intermediate\Build\BuildRules”.)
    PackagingResults: Error: Unable to
    create directory ‘C:\Program
    Files\Epic
    Games\UE_4.22\Engine\Intermediate\Build\BuildRules\UE4Rules.dll’
    for intermediate assemblies
    (Exception: Odmowa dostępu do ścieżki
    „C:\Program Files\Epic
    Games\UE_4.22\Engine\Intermediate\Build\BuildRules”.)
    UATHelper: Packaging (Windows
    (32-bit)): Took 2,1903487s to run
    UnrealBuildTool.exe, ExitCode=5
    UATHelper: Packaging (Windows
    (32-bit)): ERROR: UnrealBuildTool
    failed. See log for more details.
    (C:\Users\dom\AppData\Roaming\Unreal
    Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\UBT-MomoDeLas-Win32-Shipping.txt)
    UATHelper: Packaging (Windows
    (32-bit)): (see
    C:\Users\dom\AppData\Roaming\Unreal
    Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\Log.txt
    for full exception trace)
    PackagingResults: Error:
    UnrealBuildTool failed. See log for
    more details.
    (C:\Users\dom\AppData\Roaming\Unreal
    Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\UBT-MomoDeLas-Win32-Shipping.txt)
    UATHelper: Packaging (Windows
    (32-bit)): AutomationTool exiting
    with ExitCode=5 (5) UATHelper:
    Packaging (Windows (32-bit)): BUILD
    FAILED PackagingResults: Error:
    Unknown Error

(This whole text is in red)

I would be very grateful if someone would help me in this.