As long as you're clearly stating that the card will flip and there's a clear button to go back to the previous state, I think flipping is marginally better than a modal since the element retains its position, and it's obvious which element the user is interacting with.
With modals, you improve focus (there's less cognitive load surrounding the card), but that cognitive load amount you saved in terms of focus increases in terms of behavior because there are additional actions and elements (the modal behavior itself, scrim, and close button). Once the user closes the modal, it's not clear which card was clicked, so she might need to click again just to see which one it was.
On the other side, at some point, flip cards were prohibited by Material Design. They never said why, and now in M3 that prohibition is nowhere to be found, so I guess they realized something. But I'm providing this information to let you know that there might be something. So, as with everything in UX: TEST IT!
One thing, though: I assume by your words that this will be an
onClick behavior. If the cards flip
onHover, then it's probably better to go with a modal.