It seems you are trying to use xlwings as a dependency. ~/.local/bin is intended for executables and after pipx install xlwings the binary is located there. pipx only supports apps to be called, not modules to be imported.
I would suggest to keep running the script within a virtual environment and to ensure that the module is properly installed via pip.
Related question: What is the difference between pipx and using pip install inside a virtual environment?