That depends on the app you’re using and when you changed your mind.
If you’re still in the app with the finished image open, just use the undo button (or Cmd + Z on a Mac; Ctrl + Z on a PC) a few times to undo your changes.
In an app that uses layers, your project file will retain all the different layer information so you can make as many changes as you want at any time. You can then re-export your edited image.
Not all editors have that feature, however. On your phone, that isn’t an issue because third-party apps save their collages as new images (and in the iPhone photos app, any edits you make there are non-destructive, too. Which means you can go back to the original any time). But on a computer, apps such as Preview on the Mac don’t save in a format that keeps the layers intact: once you’ve closed the image file, the changes are permanent.
Don’t worry, though; there’s a fix. One of our favorite Mac commands is Revert To Saved, which you can use to rewind time. Just open the image in Preview and choose Revert To. This gives you the option to revert to the last saved version or to browse all the previously saved versions of the file. The same command is available in other apps too.