People who frequently used artificial intelligence may have weaker critical thinking skills, a study has found.