How do I limit the x Position of my Mouse-controlled player?

The Game is a Breakout Clone and I am talking about the paddle here.
I have a player that is only able to move along the x axis and is controlled by the mouse, but it’s not limited and can go through walls and also just disappear from the screen entirely if you move the mouse too much. So how do I limit the player to be only able to move between let’s say -15 and 15 on the x Axis? The Script is below, would appreciate your help.

using UnityEngine;

public class Player : MonoBehaviour
{
    Rigidbody _rigidbody;

    void Start()
    {
        _rigidbody = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        _rigidbody.MovePosition(new Vector3(Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, 0, 50)).x, -17, 0));
    }
}

Easiest in Unity is to make two invisible GameObjects marking the left and right limits of your playable area.

When you go to move, don’t make horribly long lines of code like line 14 above, but rather do it step by step so you can meaningfully control it.

Vector3 position = transform.position;

position += MovementInputThatYouAlreadyHaveCollectedWhateverThatIs;

if (position.x < LeftEdgeLimit.transform.position.x)
{
 position.x = LeftEdgeLimit.transform.position.x;
}

if (position.x > RightEdgeLimit.transform.position.x)
{
 position.x = RightEdgeLimit.transform.position.x;
}

_rigidbody.MovePosition(position);