Camera Moving around point

hello i have camera rotating around pivot working

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

public class CameraRotate : MonoBehaviour
{


   

    public float speedH = 2.0f;
    public float speedV = 2.0f;

    private float yaw = 0.0f;
    private float pitch = 0.0f;
   

   
    // Update is called once per frame
    void Update()
    {
     

        yaw += speedH * Input.GetAxis("Mouse X");
       // pitch -= speedV * Input.GetAxis("Mouse Y");

        transform.eulerAngles = new Vector3(0, yaw, 0.0f); 
      

    }

   
}

this , and i have another code

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

public class CameraRotation : MonoBehaviour
{
    public float speed = 10f;

    // Update is called once per frame
    void Update()
    {
        transform.Rotate(0, speed * Time.deltaTime, 0);
    }
}

this, but i cant get them both work together, how to do this?

You need to decide how they work together. Looks like one script constantly rotates it while the other script takes mouse input and directly rotates it. What are you expecting to happen?

Once you decide then you probably need to have some kind of stateful decision about which motion to obey based on some heuristic, such as if the mouse remains stationary for more than 1 second, then the timed rotation takes over, for example.