This article explains what Samsung's Separate App Sound feature is and how to use it. This feature is available on most Android phones and tablets.
Samsung's Separate App Sound – A Feature to Take Advantage Of
Samsung's Separate App Sound feature allows the apps of your choice to play sounds through a Bluetooth device, while other sounds continue to play through your phone.
For example, you want to listen to music through your headphones, but you don't want the music to be interrupted by a call. When the feature is enabled, you will still hear system sounds through your smartphone's speakers, such as alarms and the ringtone to alert you of an incoming call, so you can pause the playback itself or ignore the call or alarm.
Some apps that support this feature are Chrome, Samsung Internet, YouTube, and Samsung Music. It also works with SideSync and Samsung Push Service, the notification service for services like Samsung Pay.