Organizing user post data?

Problem:
I want users to make posts based on categories. For instance a user can make a post, and then set vehicles, food, pets as categories. The users will only see posts based on the selected category.

Is it better to make a data type of Post > and then add field for categories?

  • At scale would this be an issue to filter through thousands of posts ,and retrieve

Or is it better to store the categories as separate data types?

  • Is this method impractical. I feel that this could work i wouldn’t have to loop through thousands of data to list only 10 items.

Or is their a better method?

Category datatype

Category field on Post datatype (or a list of multiple categories are needed for one post)