You will need a 3rd generation or later model for support of the Apple TV+ streaming service.
Other apps in combination with AirPlay may require a later model AirPlay-receiving device as well. Each content provider/app publisher may set their own requirements, as it may require special provisions for device compatibility. E.g. some service require for AirPlay that the box is 3rd generation or later (e.g. Disney+), some others may require 4th generation or later (e.g. HBO Max), some make no provisions for any support (e.g. web video: hit-and-miss), some block AirPlay altogether (e.g. Netflix). See their respective websites for details. Requirements are expected to shift with the years, so at some point more legacy devices will fall behind.
Apple TV (2nd generation) is from 2010, with its last software update from 2014, so consider a more modern streaming device.