The grammar pattern ようとする expresses an attempt to do something or being about to do something. It is formed by attaching とする to the volitional form (よう) of a verb.
This pattern has two main usages depending on the tense:
When used in the past tense (ようとした), it most commonly means someone tried to do something, often with the implication that they did not succeed or that the attempt was interrupted.
The attempt itself is the focus – the action was not completed or was difficult to complete.
When used in the present/progressive tense (ようとする / ようとしている), it can describe the moment when someone or something is just about to do something. This captures the instant right before an action begins.
With the progressive form (ようとしている), the meaning can be either "is about to" or "is trying to" depending on context. If the subject is deliberately making an effort, it means "trying to"; if the action is on the verge of happening, it means "about to."
The negative form ようとしない expresses that someone refuses to or won't even try to do something. It carries a nuance of unwillingness.
Do not confuse ようとする with 〜~てみる, which means "to try doing something (to see what happens)." ようとする emphasizes the attempt or intention, while ~てみる emphasizes doing something experimentally.