Pre-covid era our joint credit card would get compromised every couple of years and the credit card company would call us to ask if we had done a certain transaction. I took my credit cards out and scratched off the 3-digit code number on the back. I had it written down somewhere if I needed it. That way a restaurant server could not get that number and use our card. We haven't had a problem with our cards since.
At some point since then our credit card company started a service where they text us every time our account is used but the card is not present, i.e. an online purchase even if it is ordering takeout food from a restaurant.