direct query to post_meta table

If I understand correctly you wish to retrieve your meta data from the database? Try looking at this WP function: https://developer.wordpress.org/reference/functions/get_metadata/

This will allow you to get the meta data you require dependent on the type of data you want to get, such as post meta data or page meta data etc.

An additional read might be this Stackoverflow question from another user. There are some answers that show how to get the meta data and echo it out.

https://stackoverflow.com/questions/22216276/display-all-post-meta-keys-and-meta-values-of-the-same-post-id-in-wordpress