President Trump said the U.S. government would look into national-security concerns raised by billionaire investor and Facebook Inc. board member Peter Thiel about Google’s ties to China.

Hours later at a Senate hearing, Google confirmed for the first time that it had killed its controversial plans for a censored search engine in China dubbed “Dragonfly.”

The...