I worry that I can't write smart characters because I am not so smart cx so it would help to get some advice.
A quick note, I'm trying to write a character that plans ahead and tries to outsmart their opponent. The scene is two groups of enemies in a forest setting, one knows where the other is located, the other isn't as lucky but has resources and people to their advantage.
Think of it like a game of cat and mouse.
There's multiple different ways to approach "intelligent" or "smart" characters.
If you want to portray a character who is exceptionally good at strategizing, I'll direct you to one of my own characters, and specifically, one of his quotes about the fundamentals of strategy.
"Strategy isn't about predicting what your opponents may do next. It is about limiting their options so that they do what you intend for them to, whilst believing it was their choice all along." ~Lucius Caelus Argentius; The Elarian Chronicles - Duskfall Collection, Volume 1
The big difference between Tactics and Strategy though is the scope.
Tactics are short-term, in-the-moment, maneuvers or actions that can be taken to make strategic gains, or secure some other goal or advantage.
Strategy is the big-picture. Multiple layers of tactical moves played out on a larger scale, often over a far longer period of time.
From your example, let's do a quick little thought-experiment.
Subject A has resources and personnel for support, but doesn't know exactly where Subject B is hiding in the forest, and the general area, let's say a 30 mile area. Subject A knows that Subject B is in the forest, and is trying to avoid detection.
Subject B, knows where Subject A, and their search parties are, and is trying to avoid detection and escape.
In this scenario, A wins if he captures B. B wins if he escapes.
In most cases, you'd likely assume that the best way for Subject A to achieve success here is to surround the area and slowly close their forces in until Subject B can be found, however this would be a fatal strategic mistake, since Subject A is actually surrendering the territorial/positional advantage of the inevitable engagement, and allowing subject B to engage their forces tactically in terrain that they already know well in a situation where they are expecting the conflict to occur.
The better (strategic) approach, would be for subject A to decide where they want the engagement to happen, and prepare the area in advance (IE: rig traps, position ambush troops, and the like); then initiate the maneuver to begin surrounding the area, except while doing so a small gap is left in their forces. One that Subject B can take advantage of to escape, and thus secure the 'win'.
In such a situation, Subject B would invariably to try and escape rather than stand and fight. This opening, however, would lead Subject B right into the zone that Subject A had prepared for an ambush, and would allow Subject A to engage the fight on terms of his own choosing, rather than potentially walking into an ambush himself.
Of course there is a lot more nuance involved, such as the size of the search parties, their spread, contact regulations, behaviors and their own tactical orders and instructions. Assessments of motivations, terrain, regional implications, logistics, and the like.
This, however, is only one sample of "smarts" in use.
A good strategist isn't just someone who can come up with, and implement an effective plan for a given situation or scenario. Nor is it someone who has contingencies upon contingencies. Sure, these things help, but they are most often adaptable on the fly. They can quickly, and accurately, analyze situations, deduce what another individual has done, or likely will do, anticipate those moves, and most importantly, know how to influence events and use and shape information and perception in order to subtly influence the decisions of their opponents.
A great strategist, is someone who can do all of that, but is also exceptionally good at delegation. They can analyze the abilities of their allies, and their adversaries, and delegate tasks in the grander scheme of things to those most capable of carrying out those tasks. Their greatest strength, and their greatest asset, are their allies, and their ability to utilize and rally those allies to achieve their goals.
"A force divided haphazardly is a force weakened. One divided and carefully positioned with clear tasks and purpose, however; even if smaller, can greatly strengthen one's own position while drastically weakening that of one's foes."