Assuming you’re sharing with someone who can install Python and additional modules…
I quite like @lisalisaj’s options for sharing things online. This may be easier than trying to ensure requirements are met yourself as the online solutions often have the requirements in place.
In more general terms for Python programs requiring some libraries (e.g. from PyPA): If you haven’t already you’d want to look into virtual environments for Python due to dependency issues. Because libraries and packages change so often you’d want to make sure whoever you shared your code with has the same versions. See for example-
There are a few routes to then ensuring the correct dependencies are listed in what you share, e.g. freezing requirements files, yaml, Pipfile etc. The following link seems to cover a few of the better known options and then how to install packages (on the receiver end for example) using those requirements files:
If you’re trying to share your program with someone who does not have access to Python or the permission to install packages then it is much more difficult; you’d best have a web search for some useful information. There are tools to squeeze python programs into binaries you could pass on with external storage devices e.g. pyinstaller, py2exe (and others) but they have some drawbacks e.g. file size and compatibility.