I thought that was cool so I read the wikipedia page you linked…and that’s not what he did.
Carnegie’s funds covered only the library buildings themselves, and Carnegie gave library buildings to cities on the condition that the cities stocked and maintained them
He built the buildings but required the cities to pay for the upkeep. We want it the other way around. The libraries already exist but someone has to pay to keep them running.