Yes, generally speaking. Some HOAs may allow voluntary participation but there are usually amenities or other neighborhood features they'll lose access to by doing that. One way to get around an HOA is to already own your property before the HOA is established or expands to your neighborhood.
Once you buy a home that's part of an HOA, you automatically become a member of the HOA. HOA rules are legally binding, and you must adhere to all rules and regulations in the governing document. Yes, there are bylaws that you may not like, but there are no HOA loopholes.
Choose a Non-HOA Community: The most straightforward way to avoid HOA fees is to buy a home in a neighborhood that does not have an HOA. Negotiate with the HOA: If you already live in an HOA community, you could try negotiating with the board to reduce your fees or request exemptions based on your circumstances.