For Home Sharing, both devices need to connect to the same home network. Test: If you can use AirPlay/Screen Mirroring, then the home network itself is not the issue for Home Sharing.
For Home Sharing, also have matching Apple ID accounts in the Settings for Home Sharing specifically:
On Apple TV: Settings﹥Users and Accounts﹥Home Sharing﹥[enter Apple ID]
On Mac: System Settings﹥General﹥Sharing﹥Media Sharing ☑︎﹥ⓘ﹥☑︎ Home Sharing﹥[enter same Apple ID]
If there are multiple computers with Libraries available on the network, then verify that each has a unique Library name.
There shouldn’t be more to it than that. If Home Sharing is on on the Mac, then it responds to Home Sharing requests from other devices using that same Apple ID account.