For nearly 20 years, Apple has offered screen sharing as a basic feature in what was once OS X and is now macOS. This has included a way to share your screen remotely with other people and let them share yours. (At one point, it was easy to reach your Mac while outside your local network and access your screen, but then Apple removed Back to My Mac from macOS.)
The feature has changed and migrated over time—it was once part of AOL Instant Messenger!—so you may not know that it’s tucked away in Messages. It also works only with people who use their iCloud account with Messages, which allows you communicate through Apple’s iMessage system.
You can check that iMessages is in use by either looking at a conversation and seeing blue bubbles for text messages. Or, when starting a new conversation, the person whose name you select as you type in a recipient is in blue text. If their name or the messages are green, it’s regular SMS text messaging and screen sharing isn’t available. It’s also available only for one-to-one conversations.