It is not possible to make PDF out of conversations directly from iOS, via the Messages app. You can take screenshots of the conversations from your iPhone, and insert the screenshots in a document
You can see how to take screenshots here:
Take a screenshot on your iPhone - Apple Support
Alternatively, you can mark the messages in a conversation and select Forward. The marked text will be collected in the message field, where you can copy it into e.g. Pages and choose to save the document as a PDF.
If you have a Mac:
If you use a Mac and are signed in to the same Apple ID as on your iPhone, and you can see your messages, you can create PDF of your conversations directly from the Messages app.
Open the Messages app, select a conversation, select File in the top menu, and select Print, and choose to save as PDF.