The answer depends on how many rows you have in your database.
If you have millions of Posts with hundreds of comments/likes per Post, then you might want to use "lazy" loading (where you retrieve the 50 posts you are going to show then retrieve the comments and likes for each post).
You probably don’t have that many rows, in which case you can just do a query that joins the 3 tables.