Memes typically include images or videos that have a creator who owns the rights to them, so it is possible to infringe on somebody else's copyright when creating a meme. However, memes typically fall under the fair use doctrine which allow meme creators to use copyrighted work. Some things fair use takes into account are:
- The purpose of the use,
- The amount of the work to be used,
- The effect of the use on the market for or value of the original work, and
- The nature of the copyrighted work. If you are using a template or Kapwing's image search, which uses Google search to find images, your creation may fall under fair use but there is no guarantee that the images or videos are copyright or royalty free.
Here is the article that was referenced for most of this information: Memes, Fair Use, and Privacy. This should not be a substitute for actual legal advice, so please use your best judgment and/or consult a legal expert if you are still uncertain.