In a matter of just 24 hours this weekend, Donald J. Trump traversed two very different worlds, neither one of them his own.

On Friday night, he appeared before religious leaders in West Palm Beach, Fla. The next afternoon, he was in Nashville, yukking it up with thousands of crypto-evangelists at a Bitcoin conference.

The two groups could hardly be less alike, and Mr. Trump — neither a pious man, nor technologically savvy one — made for an unlikely champion at each. And yet, taken together, the two appearances provided a case study in how he code switches — from Christianity to crypto — as he campaigns.

He begs, he blusters, he makes outlandish promises. And his attempts to win over a crowd that is not inherently his own can be acutely awkward.

On Friday, he spoke at the Believers Summit, a religious conference put on by Charlie Kirk, the founder of Turning Point USA, a conservative activist group. It was a slickly produced affair befitting the Southern televangelists and hundreds of pastors and ministry heads who turned up for it.

In this setting, martyrdom was the motif, and Mr. Trump leaned into it, hard. (“I took a bullet for democracy,” he said at one point.)