Where the saves are

Stardew Valley: %APPDATA%\StardewValley\Saves on Windows, ~/.config/StardewValley/Saves on a Mac.

Terraria: Documents\My Games\Terraria\Worlds on Windows, ~/Library/Application Support/Terraria/Worlds on a Mac. Terraria also keeps .wld.bak files beside each world.

Valheim: %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local on Windows. Valheim keeps its own backups of each world too.

Backing up by hand

Copy the save folder somewhere safe, with the date in the name, before anyone plays. To roll back, quit the game and copy the backup over the current save. It works, as long as everyone remembers every time.

With Sleepingbag

Sleepingbag keeps up to 30 versions of each farm or world, at most 2 GB of them and always at least 3, and backs up your local copy before every download. On Sleepingbag Cloud, the group’s page lists each world’s versions, so you can download an earlier one. The copies Sleepingbag made on your own computer are under Settings → Show backups.