Currently, in the Schengen Area, the only complete record of your entries or exits are the stamps in your passport (if any). This will change (for some cases) whenever the EES becomes active (originally planned for 2023, delayed multiple times, now planned for "sometime in 2025").
As pointed out in the comments, there can be records at the national level, but they are not necessarily consistent or systematic (I've been "waved through" more times than I can count just by vaguely showing my passport or ID, I think many times the officer didn't even touch it). They are however more likely for non-EU citizens.
What border officials generally do with a passport (details vary):
- Make sure it looks genuine (physical inspection, check for alterations, check the security features...). May involve using an UV lamp to see some of the security features.
- Use a passport reader to read the MRZ (the two lines at the bottom of the bio data page) and the RFID chip (for e-passports). This will give them the "real" data with is authenticated by crypto (a lot harder to forge than the bio data page, and a lot easier to check).
- Look you up in the Schengen Information System (SIS) to see if you are forbidden from entry or other similar situations
- Possibly compare what the bio data page says to what the RFID chip says.
- Check that you look like the picture in the passport
- When required, look for a valid visa
- When required, check the visa in the Visa Information System (VIS) to see if the visa hasn't been annulled or cancelled, and see a few details about the application to ask questions about your stay.
- When required, go through the passport to look for previous entry/exit stamps, and possibly count the days you were in and whether you still have days under the 90/180 rule, or under the rules of your visa, if appropriate.
- When required, put a stamp, though there are many cases where they should and don't and vice-versa.
A lot of the lookups can be completely automated by just putting the passport on the reader: it will scan the MRZ, compute the key to access the RFID chip, read the RFID chip, perform authenticity checks, and get all the data required to perform the lookups in the SIS, VIS, etc, and display all the results on their screen (presumably with big bold red warnings when necessary).
Two diagonal lines in the corner of an entry or exit stamp invalidate that stamp. This is often done when you exit Schengen, but can't actually travel to the other country (for instance: at a land border: the other country refuses entry; for flights: the flight was cancelled and you come back into Schengen).
Not quite sure what they did on their computer. Possibly log the fact that they cancelled a stamp and why in case someone comes back to ask about it?