Forms I-134 and I-864 are both affidavits of support, but they are used for different visa types.
Both of the forms are used to provide evidence to the USCIS that the applicant will have financial support when they enter the U.S., but the difference is that
Technically, the sponsor of the nonimmigrant or immigrant is the person who fills out the affidavit of support. The nonimmigrant or immigrant includes the form in the supporting documentation for their immigration application.
K class visas, also known as fiancee visas, are considered nonimmigrant visas in the case of deciding which affidavit of support to use.