Hi, I have the same problem, and I found the solution:
1. Go to System Preferences > Click Security & Privacy > Privacy tab.
2. If there is a Team Application, try to delete it first by select the "Teams Application list" and klik the minus " - " sign in the left corner of the selection box
3. When finished, click the plus " + " sign in the left corner of the selection box, browse the Application > select the Microsoft Team (work or school).app and click OPEN
4. Now retry the share screen on Teams, it should work.
Greeting from Bali