I would assume that you need to build all the dependencies that python needs.
In this case you need to build libffi. The srouces are on http://sourceware.org/libffi (according to the Fedora Linux RPM).
Also that is not the latest version of the source code for 3.9 is there a reason not to use the latest version of 3.9 or even 3.10?
I think the build instructions would say, if I needed to build anything separately. Moreover, the output of the build.bat says Fetching libffi.... So it seems it should download (and build?) the libffi itself. I’m not sure why the needed file isn’t present then.
Regarding the python version. I already have the python 3.9.5 on my PC. I want the same version, just with some changes.
I see that Fedora is using libffi ABI 8 and your error was for ABI 7.
Do you see any version of libffi that was built?
Maybe you have to get an old version of libffi to go with the old python 3.9.
You are running with a lot of know security issues and bugs then.
I recommend that if you have a problem with 3.10 then update to the security release 3.9.14.
You may also find that it might work with newer libffi.
The issue is that v3.9.5 did not pin libffi to a particular version in get_externals.bat, but rather downloaded from the libffi branch. If you cherry-pick commit 399cd466d03, the build should work as expected.