I assume that for each of the table and card component (and also for the widget), there is already a specified/defined layout and styling for the CTA. So to me that would seem to be the most logical position for the CTA in the container/widget because you are using a consistent design pattern/component.
Of course, there might be reasons why it doesn't make sense to do so, but there isn't any specific information you have provided here to suggest that this is the case. Some particular reasons might include the fact that you have already customized some GUI components, and now you want to conform to the new component rather than revert to the existing component (but you should document this type of information). It could also be that you have analytics information to show that there are some issues with the workflow or locating/understanding the CTA in that particular context so it makes sense to test other design ideas. It can even be as simple as the fact that there is some clash or conflict with existing design system or style guide around layout, spacing or styling that you need to resolve in this way.
As a general principle, some good practices or considerations when it comes to the placement of the CTA are consistency, ease of access/clear placement and visibility for the user, good flow with the rest of the content displayed, and generally being suitable for the action to be performed in terms of labelling and styling.