I forget all the things I needed to install first. Some of these may be irrelevant.
brew install libtool pkg-config shtool grep gcc openssl@1.1
# from your checkout of curl
glibtoolize
aclocal
autoconf
autoheader
automake --force-missing --add-missing
./configure --with-ssl=/usr/local/opt/openssl@1.1 --prefix=/tmp/curl
make clean
make
make install
# now give it a try
/tmp/curl/bin/curl --tlsv1.3 -s https://google.com -X HEAD -v