Cannot Set Boundaries in the Map

Hi, I am trying to set up the boundaries on the map where my character moves, but after I insert these code in, my character still moves out of the boundary. Could you help me with this? Thanks

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Map : MonoBehaviour
{
    private BoundsInt boundsInt;
    public Vector3Int MinAxis = new Vector3Int (0, 0, 0);
    public Vector3Int MaxAxis = new Vector3Int (727, 405, 0);

    void Start()
    {
        boundsInt.SetMinMax(MinAxis, MaxAxis);
    }

Can you include the code that’s meant to prevent the character from going outside the map bounds?

Thanks for the tip. Didn’t know I need this one as a beginner.