Organizational membership
Set up your Membership Type as you would expect to. Use 'inherited relationships' if you want eg Employees of that organisation to be considered members.

Then on the Contribution page, use the 'on behalf of organisation' settings on the first screen to set up so Person A can sign up on Behalf of Org B.

Check out the documentation link below. Won't be hard to find once you know to search for 'on behalf of' phrase

NOTE: a contact needs to have a Permissioned and Current 'Employee of' relationship if they are to have the Org field prefilled eg when renewing via a checksum

Documentation