How can I connect my Mac Mini to my Apple TV?

Hello! I have been trying to connect my Mac Mini to my Apple TV for a few days now and I can't seem to get them working together. What could I be doing wrong? Can I please get some help?
Are they on the same network? The key is Airplay which should come up as an icon on the control bar automatically. Here's an iMore blog that explains how to connect a Mac to a TV in various ways...

How to connect your Mac to the TV: Apple TV, HDMI, and more! | iMore

It also links to this blog about Airplay....

How to AirPlay Mirror your Mac screen to your Apple TV | iMore

Original thread: https://forums.imore.com/threads/how-can-i-connect-my-mac-mini-to-my-apple-tv.349632/