Help with package installation with console_scripts

Hi! I’m trying to create a wheel of my package. The includes also an entry point.

the structure of the package is the followig:
|__ requirements.txt
|__ pyproject.toml

I created the wheel with python -m build
and installed it using python -m pip install dist/package_name.whl
The problem is that the command defined in the entry point does not work from the command line.
If I install the package doing python -m install then everything works fine.
Could anyone explain me what’s happening? or pointing me to a good explanation?
what are the best practices to package a python app? I was trying to do this with build because of the SetuptoolsDeprecationWarning I sow when I run python -m

I’m using python 3.9.12 in a conda env on linux

Thanks in advance for your help!