This error usually happens when anti-virus software somehow interferes with julia installing artifacts. See Artifact folder could not be made on Windows. · Issue #3822 · JuliaLang/Pkg.jl · GitHub for more info.
A quick fix would be to install the packages on julia 1.9 or somehow change your anti-virus settings.
I have a PR that hopefully fixes this issue Retry artifact rename if it fails by nhz2 · Pull Request #4001 · JuliaLang/Pkg.jl · GitHub but I don’t have access to the right computer to test this PR.