The action you're trying to perform is called “stabilization,” which is usually performed by analyzing the entire frame when the goal is to eliminate camera shake, but when you want a single object to stay in place, you'd track a single point, or small area of the target, and apply the same counter-movement that you would to eliminate shake.
In AE, point trackers are under the animation menu→Track Motion. After you analyze the subject, click the “Stabilize Motion” button on the “Tracker” tab.
If you don't have AE, the free version of DaVinci Resolve can do the same thing, and there are several ways to do it.
- On the Color Page, go to the “Window” tab, add a shape to track, then switch to the “Tracker” tab, select “Stabilizer” from the dropdown, and click “Stabilize.”
- On the Fusion Page, hit shift-space to call the select tool menu, and start typing “tracker.”
Click OK, hold Shift and drag this new node onto the line connecting “Media In” to “Media Out.”
Move the green box that appears over the area of the footage you want to track, click the “Track Forward” button.
When it finishes, switch to the “Operation” tab and select “Match Move” from the dropdown.
The Fusion method won't zoom in on the result by default, so you'll see black boarders around the edges as the footage moves to compensate, but you can easily zoom in on the edit page, or do it “properly” in fusion by adding a Transform node, and scaling there.