If you are starting TeamViewer on your Mac running macOS 10.15 (Catalina) for the first time, you will be prompted with the following dialog:
By default, all permissions are set to Denied. Please give permission to the system capabilities manually to use TeamViewer as desired. If you or others need to access the Mac remotely, Screen Recording and Accessibility are required at a minimum.
To allow the access, click the buttons shown in the dialog. Eg. click Open Full Disk Access Preferences… which will bring you to the Full Disk Access section of the Privacy pane, inside the Security & Privacy preferences:
For the Accessibility access you will need to click the padlock icon in the lower-left corner to make changes. You will be prompted to enter the credentials of an administrator account to continue.
Put a check next to TeamViewer to grant it access:
Repeat the same for Screen Recording and Accessibility if desired. Those are required to control your Mac.
Click again on the padlock in the lower-left corner to prevent further changes.
Now you can close the Security & Privacy window. The next time you want to receive an incoming connection with TeamViewer, the person connecting to your Mac will be able to see and control your screen.
The permission status can be reviewed under Help -> Check system access at any time.