Is there a way to add a buy button in a post?
What do you mean in a post? Do you mean a details view?
@Nelson welcome to the community.
As @ThinhDinh said you need to tell us a bit more so we can understand your question or issue.
In the meantime you can have a look at the documentation which may help?