It really boils down to which stack you are familiar with / which stack integrates better with the rest of your infrastructure / use case.
If you're already ingesting a lot of data to ES and you want to vectorize it, it has a good support for cosine similarity in its indexes.
If you store data in a PG database and you want to make it searchable by similarity, then pgvector is a good choice. It's especially powerful coupled with the ease of use of the supabase platform. You can make a document-based chatbot very very quickly.
In both cases it is more of a datatype and a lot of your logic will still reside in your application layer.
In my case I was already ingesting data into elastic, so I just added a dense_vector property to my index, and a vectorization step in my external code by calling the openAI api and saving the result into dense_vector.
In the future, I'm planning to build an AI powered webapp and my stack of choice will be supabase + pgvector because it's a better option as a public app backend.