Look at how the web site formatted your question. Some of it is in text and a large portion has line numbers. You need to use the Code Sample tool when posting code. That's the 101010 icon.
Assuming that you posted everything, it looks like you just need an ending "}".
Check the starting and ending brackets of each function. Note that the cursor is on the bracket on line 15, and it's matching ending bracket on line 17 has a gray background. You can also click on the minus signs on lines 12 and 14 to collapse that portion of code. That should help you identify what code is part of what statement.
Proper indentation also helps. Everything in a "{}" block should be indented one tab. That should help you match up the start and end of the code block.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public float checkRadius;
public LayerMask whatIsGround;
public bool canMove;
public float speed;
public float minX, maxX;
public Vector2 targetPos;
private Animator anim;
private void Start()
{
anim = GetComponent<Animator>();
}
public void Update()
{
canMove = Physics2D.OverlapCircle(transform.position, checkRadius, whatIsGround);
if (Input.GetKeyDown(KeyCode.A) && transform.position.x > minX && canMove)
{
targetPos = new Vector2(minX, transform.position.y);
StartCoroutine(AfterMove());
}
else if (Input.GetKeyDown(KeyCode.D) && transform.position.y);
{
targetPos = new Vector2(maxX, transform.position.y);
StartCoroutine(AfterMove());
}
transform.position = Vector2.MoveTowards(transform.position, targetPos, speed * Time.deltaTime);
}
public IEnumerator AfterMove()
{
new WaitForSeconds(.13f);
new WaitUntul(() => transform.position.x == maxX || transform.position.x == minX);
if (transform.position.x == maxX)
{
anim.SetTrigger("left");
}
else if (transform.position.x == minX)
{
anim.SetTrigger("right");
}
}
}