It is usually an option in your bank's app. It depends on the bank though, obviously. If it's not there, you have to be vigilant while using your card (always select the local currency when given the option).
Gemini confirms it's not a thing, and not really possible (the terminals just detect the country from the card number)
Edit: Perplexity says this:
> cards cannot block DCC offers because the merchant terminal identifies your card’s country of origin from the card number and offers DCC accordingly. Always manually decline at payment to let the card handle conversion at better rates