You can also create a "Bundle" file using the autobundle command of the cpan client to list all modules for later reinstallation:
Package namespace installed latest in CPAN file
Algorithm::C3 0.10 0.11 HAARG/Algorithm-C3-0.11
Algorithm::Diff 1.1903 1.201 RJBS/Algorithm-Diff-1.2
Wrote bundle file
The list of modules listed in this bundle can then be installed in another environment using:
perl -MCPAN -e 'install Bundle::Snapshot_2021_07_05_00'
(as the module itself says)