Mr. Cotton’s willingness to court controversy by backing—or exceeding—the president’s agenda puts him in the spotlight as Republicans jockey to influence Mr. Trump, and as a potential carrier of the president’s banner when he eventually leaves the White House.

“Tom Cotton is indeed setting himself up to be the heir to Trumpism,” said Geoffrey Kabaservice, director of political studies at the Washington-based think tank Niskanen Center, who studies Republican politics. “In some ways, I think his case to lead the Trump wing of the party after this era has only been strengthened by this past week.”…

Mr. Cotton came on to the political scene almost 15 years ago, when as a lieutenant in Iraq, he called for some journalists to be imprisoned for espionage, and his friction with the press is well-known. In the halls, he typically declines to speak to reporters, and instead is known for prompting his young son to tell reporters “no comment” when they ask a question. Mr. Trump has threatened jailing reporters—though hasn’t followed through—and suggested some negative coverage of him was illegal.

“They see a lot eye to eye,” said Doug Deason, a donor to Mr. Cotton.