Ideally you can restore whatever you‘ve deleted from a backup.
If you removed the standard Python installation of macOS, boot into the Recovery Partition (if any) and reinstall macOS from there. This should leave your other files intact, it‘s not a bad idea to do a backup before nevertheless.
Alternatively, you can through Homebrew.
Once Homebrew is ...