A wrong keep rule in borg prune removes archives you wanted. The prune command can show its decision before it does anything, which is how I would test every new rule.
borg prune -v --list --dry-run --keep-daily=7 --keep-weekly=4 /path/to/repo
This is the example from the Borg docs: keep 7 end-of-day archives and 4 additional end-of-week archives, and do a dry run without deleting anything. --list prints every archive together with whether prune keeps it or prunes it, and --dry-run means the repository is not changed.
When the list is what you wanted, run the same command without --dry-run. If several machines or jobs write into one repository, limit the rule to one of them by archive name, as the docs do with the hostname:
borg prune -v --list --keep-daily=7 --keep-weekly=4 --glob-archives='{hostname}-*' /path/to/repo
This only works when your archive names follow a pattern, which is a good reason to name archives {hostname}-{now} from the start. Without a pattern, a rule meant for the laptop can delete the server’s archives.
Other keep options exist for different shapes: --keep-within for a time interval, --keep-monthly, --keep-yearly, and --keep-last. A value of -1 keeps one archive for every period, for example --keep-monthly=-1 keeps an end-of-month archive for every month.
Remember that prune only deletes the archives. The docs state it plainly: repository space is not freed until you run borg compact. So a smaller disk usage is not the sign that prune worked. Once the real prune has run, the deleted archives are gone, even while the files still take up space.
Further reading: Borg docs: borg prune