Are you using the Teams desktop application for Linux?
If yes, please kindly note that it would be retired in December (this month).
Please consider switching to the PWA version for better support.
How to install: Microsoft Teams progressive web app now available on Linux
Within the PWA version screen sharing should work fine for you.
An example in Ubuntu 22.04:
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.