Hi @na2022 ,
If I understand correctly, your gallery is on another screen. What you can do is to set the OnSelect property of the buttons with a Navigate() function and pass a context variable that corresponds with the course, for instance:
Navigate(Screen1,ScreenTransition.None,{CourseCode:"PL-900"})
In the screen you are navigating to (screen1 in the above example), you'll have a gallery for which you need to add a filter to the Items property:
Filter(YourCourseList, Code = CourseCode)
This will check your data source (YourCourseList in the above example) to find any matches against to value set for the context variable.