A couple of years ago, Apple introduced a feature in iOS which allowed you to tap and hold an object in the foreground of any photo in the Photos app, and then either drag and drop it into a document or message. In iOS 17, you can also use it to create a dedicated sticker to use in Messages. It seems Samsung has been inspired by this feature and introduced its own version in One UI 15.1 earlier in 2023.