error in running exe file after changing .py to .exe
A quick google search of the error message reveals two issues describing the issue and potential solutions.
One of the issues is in the pyinstaller repo, and suggests adding the cv2 path to the pyinstaller invocation:
pyinstaller --onefile sample.py --paths &quot;/root/opencv-4.3.0/release/lib/python3/cv2&quot;

You can get the actual path by running a simple python program:
import cv2
print(cv2.__file__)

The other issue is in the opencv repo and may apply especially if you compiled opencv yourself.
UPDATE: with respect to the error ImportError: DLL load failed while importing cv2, according to the FAQ, you should install the Visual Studio C++ redistributable