STOCKHOLM—Chinese social media company TikTok could face a ban in the European Union if it does not step up efforts to comply with EU legislation before September, the top official overseeing the EU’s internal market told the company’s CEO on Thursday. TikTok needs to bring its business in line with the EU’s Digital Services Act…