California’s Democratic-controlled Legislature passed a torrent of bills as their session came to a close Monday night, including more than two dozen measures that would restrict various uses of AI and curtail how social media companies’ products can be used by minors.