Just pick the most obvious one. Partnerships are divided into general partnerships and limited partnerships. The investors of a general partnership are all general partners, and they are jointly and severally liable for the debts of the enterprise with all their personal property. The investors of a limited partnership consist of general partners and limited partners. The general partner shall bear unlimited joint liability with all his personal property, and the limited partner shall bear limited liability. See the partnership agreement for the specific way of debt sharing. If there is no provision in the partnership agreement, it shall be based on the proportion of capital contribution.
The company is an enterprise legal person, which is divided into limited liability companies and joint stock limited companies. The company shall bear unlimited joint and several liability for debts with all its property, and shareholders shall bear limited liability to the extent of their capital contribution.
I think to put it bluntly, the risk of a company is much smaller than that of a partnership, at least shareholders will not make themselves penniless because of debt problems.