U.S. libraries, beset by book controversies, shrinking budgets, an influx of homeless and the ongoing loss of their readers to the Internet, are struggling to adjust to a post-pandemic reset that has many communities looking at cutbacks and closings.