I have two tables, User and Post. One User can have many posts and one post belongs to only one user>
User
Post
posts
post
user>
Now you can use the pluckmethod on a Collection instance:
pluck
Collection
This will return only the uuid attribute of the Post model
uuid
Post model
App\Models\User::find(2)->posts->pluck('uuid') => Illuminate\Support\Collection {#983 all: [ "1", "2", "3", ], }