I recommend using an AUR helper like yay, over manual makepkg's. AUR helpers come with some gotchas that makes them not suitable for beginner arch users, but for big packages like ros2-galactic they can help with cumbersome dependency resolutions. In practice you'll often hop between yay and makepkg, depending on the size of the package to be installed, etc.
It looks like you're sourcing an anaconda environment (probably in your .bashrc file) when building python3-* packages. This should be avoided.