He was a socialist in his early years, granted...but he did a complete 180 as he matured.
His Hugo Award winning novel The Moon is a Harsh Mistress (just as an example) is a work which espouses economic freedom, not collectivism. Its well known as one of the greatest Libertarian sf novels of all time.
If you read all of his works, from the first to the last, you will understand partly. But more you need to look to what he did rather than what he wrote. He was a “free love” classic California closet socialist. He masked it well, but there it is.