A new US law banning TikTok has come into effect, hours after the popular app stopped working across the country.