The New York state Legislature has passed a bill that would allow parents to block their kids from getting social media posts suggested by a platform’s algorithm — a regulation that tries to curtail feeds that critics argue are addicting to children.