After a migration or a restore, I want proof that the table on the new server has the same contents as the old one. Row counts are a weak check, since a changed value keeps the count the same.
CHECKSUM TABLE shop.orders;
+-------------+------------+
| Table | Checksum |
+-------------+------------+
| shop.orders | 2564128487 |
+-------------+------------+
Run the same statement on both servers. Equal numbers mean the rows match; a different number means something differs, though it does not say which row. You can list several tables in one statement, separated by commas.
The checksum is calculated by reading every row, so on a large table it takes about as long as a full scan. Run it outside busy hours.
It only works as a comparison when the table definitions match too. The docs warn that the result can differ between server versions and with a different row format, so comparing MariaDB 10.3 against 11.4 may give different numbers for identical data. Compare like with like, or fall back to dumping both sides with one row per line and diffing them. A table that does not exist gives a NULL checksum and the statement still succeeds, which is easy to miss in a script.
Further reading: CHECKSUM TABLE