There was an issue with the latest straight.el commit.
https://github.com/doomemacs/doomemacs/issues/6960
One way to fix it, is to update straight repo and getting latest version of straight , that fixed it for me. it is fixed in straight here radian-software/straight.el@3eca39d
@unuunc Thank you.
Add some details:
cd ~/.emacs.d/.local/straight/repos/straight.el git pull origin develop
You can upgrade if you pin straight first in packages.el
(package! straight :pin "3eca39d")
If you don't care about upgrading for now you can skip the unpin in packages.el and just doom sync