Don’t compare which one has greater merit, but do good deeds without asking about the future.
Theoretically speaking, printing and distributing scriptures has greater merit. Because printing scriptures and giving them to others is to promote Buddhism and save people’s wisdom and life. People who have the opportunity to learn the Dharma and have faith in the Dharma will not kill, steal, engage in sexual misconduct, etc. It can help people escape from ignorance, break ignorance, and open up wisdom. This merit is very great.
In addition, when releasing animals, as long as you follow certain rituals, you will also plant good roots in the released creatures. No matter what you do, motivation is very important. If you do meritorious deeds with a calm mind and are compassionate and selfless, the merits will be very great. If you do things with an unclear mind and a greedy mind for merit, your merit will be much smaller.