Help please, The YouTube tutorial didn't work

I was following a tutorial and this happened

what is happening, and what are these errors?

InvalidOperationException: Cannot read value of type 'float' from control '/Simulated Touchscreen/position' bound to action 'Touch/TouchPosition[/Simulated Touchscreen/position]' (control is a 'Vector2Control' with value type 'Vector2')
UnityEngine.InputSystem.InputActionState.ReadValue[TValue] (System.Int32 bindingIndex, System.Int32 controlIndex, System.Boolean ignoreComposites) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:2808)
UnityEngine.InputSystem.InputAction+CallbackContext.ReadValue[TValue] () (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputAction.cs:1948)
TouchDragScript.TouchPressed (UnityEngine.InputSystem.InputAction+CallbackContext context) (at Assets/Scripts/Cards/TouchManager.cs:28)
UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe[TValue] (UnityEngine.InputSystem.Utilities.CallbackArray`1[System.Action`1[TValue]]& callbacks, TValue argument, System.String callbackName, System.Object context) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Utilities/DelegateHelpers.cs:46)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

InvalidOperationException while executing 'performed' callbacks of 'Touch/TouchPosition[/Simulated Touchscreen/position]'
0x00007ffe62abdebd (Unity) StackWalker::GetCurrentCallstack
0x00007ffe62ac2e83 (Unity) StackWalker::ShowCallstack
0x00007ffe63a683bd (Unity) GetStacktrace
0x00007ffe64171106 (Unity) DebugStringToFile
0x00007ffe61c03337 (Unity) DebugLogHandler_CUSTOM_Internal_Log_Injected
0x000001cd23cc4613 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log_Injected (UnityEngine.LogType,UnityEngine.LogOption,string,intptr)
0x000001cd23cc452b (Mono JIT Code) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x000001cd23cc448b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x000001cd23cc4210 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000001cd7f83c7e5 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x000001cd7f838423 (Mono JIT Code) UnityEngine.InputSystem.Utilities.DelegateHelpers:InvokeCallbacksSafe<UnityEngine.InputSystem.InputAction/CallbackContext> (UnityEngine.InputSystem.Utilities.CallbackArray`1<System.Action`1<UnityEngine.InputSystem.InputAction/CallbackContext>>&,UnityEngine.InputSystem.InputAction/CallbackContext,string,object) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Utilities/DelegateHelpers.cs:52)
0x000001cd7f837de3 (Mono JIT Code) UnityEngine.InputSystem.InputActionState:CallActionListeners (int,UnityEngine.InputSystem.InputActionMap,UnityEngine.InputSystem.InputActionPhase,UnityEngine.InputSystem.Utilities.CallbackArray`1<System.Action`1<UnityEngine.InputSystem.InputAction/CallbackContext>>&,string) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:2503)
0x000001cd7f83794b (Mono JIT Code) UnityEngine.InputSystem.InputActionState:ChangePhaseOfActionInternal (int,UnityEngine.InputSystem.InputActionState/TriggerState*,UnityEngine.InputSystem.InputActionPhase,UnityEngine.InputSystem.InputActionState/TriggerState&) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:2448)
0x000001cd7f837313 (Mono JIT Code) UnityEngine.InputSystem.InputActionState:ChangePhaseOfAction (UnityEngine.InputSystem.InputActionPhase,UnityEngine.InputSystem.InputActionState/TriggerState&,UnityEngine.InputSystem.InputActionPhase) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:2358)
0x000001cd7f83686b (Mono JIT Code) UnityEngine.InputSystem.InputActionState:ProcessDefaultInteraction (UnityEngine.InputSystem.InputActionState/TriggerState&,int) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:1936)
0x000001cd7f833ebb (Mono JIT Code) UnityEngine.InputSystem.InputActionState:ProcessControlStateChange (int,int,int,double,UnityEngine.InputSystem.LowLevel.InputEventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:1519)
0x000001cd7f8333a3 (Mono JIT Code) UnityEngine.InputSystem.InputActionState:UnityEngine.InputSystem.LowLevel.IInputStateChangeMonitor.NotifyControlStateChanged (UnityEngine.InputSystem.InputControl,double,UnityEngine.InputSystem.LowLevel.InputEventPtr,long) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputActionState.cs:1327)
0x000001cd7f8258e4 (Mono JIT Code) UnityEngine.InputSystem.InputManager:FireStateChangeNotifications (int,double,UnityEngine.InputSystem.LowLevel.InputEvent*) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/InputManagerStateMonitors.cs:382)
0x000001cd2408b573 (Mono JIT Code) UnityEngine.InputSystem.InputManager:UpdateState (UnityEngine.InputSystem.InputDevice,UnityEngine.InputSystem.LowLevel.InputUpdateType,void*,uint,uint,double,UnityEngine.InputSystem.LowLevel.InputEventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/InputManager.cs:3560)
0x000001cd7f832cbb (Mono JIT Code) UnityEngine.InputSystem.LowLevel.InputState:Change<UnityEngine.InputSystem.LowLevel.TouchState> (UnityEngine.InputSystem.InputControl,UnityEngine.InputSystem.LowLevel.TouchState&,UnityEngine.InputSystem.LowLevel.InputUpdateType,UnityEngine.InputSystem.LowLevel.InputEventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/State/InputState.cs:132)
0x000001cd7f832a53 (Mono JIT Code) UnityEngine.InputSystem.LowLevel.InputState:Change<UnityEngine.InputSystem.LowLevel.TouchState> (UnityEngine.InputSystem.InputControl,UnityEngine.InputSystem.LowLevel.TouchState,UnityEngine.InputSystem.LowLevel.InputUpdateType,UnityEngine.InputSystem.LowLevel.InputEventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/State/InputState.cs:98)
0x000001cd7f832713 (Mono JIT Code) UnityEngine.InputSystem.EnhancedTouch.TouchSimulation:UpdateTouch (int,int,UnityEngine.InputSystem.TouchPhase,UnityEngine.InputSystem.LowLevel.InputEventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs:337)
0x000001cd7f805c7b (Mono JIT Code) UnityEngine.InputSystem.EnhancedTouch.TouchSimulation:OnEvent (UnityEngine.InputSystem.LowLevel.InputEventPtr,UnityEngine.InputSystem.InputDevice) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs:195)
0x000001cd7f805304 (Mono JIT Code) UnityEngine.InputSystem.Utilities.DelegateHelpers:InvokeCallbacksSafe<UnityEngine.InputSystem.LowLevel.InputEventPtr, UnityEngine.InputSystem.InputDevice> (UnityEngine.InputSystem.Utilities.CallbackArray`1<System.Action`2<UnityEngine.InputSystem.LowLevel.InputEventPtr, UnityEngine.InputSystem.InputDevice>>&,UnityEngine.InputSystem.LowLevel.InputEventPtr,UnityEngine.InputSystem.InputDevice,string,object) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Utilities/DelegateHelpers.cs:71)
0x000001cec7b047b3 (Mono JIT Code) UnityEngine.InputSystem.InputManager:OnUpdate (UnityEngine.InputSystem.LowLevel.InputUpdateType,UnityEngine.InputSystem.LowLevel.InputEventBuffer&) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/InputManager.cs:3228)
0x000001cec7b0208d (Mono JIT Code) UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/NativeInputRuntime.cs:65)
0x000001cec7b01e45 (Mono JIT Code) UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)
0x000001cec7b01f02 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr (object,intptr,intptr,intptr)
0x00007ffe5c42d8c4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffe5c3785b4 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007ffe5c3786c5 (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ffe629e17a4 (Unity) scripting_method_invoke
0x00007ffe629bf744 (Unity) ScriptingInvocation::Invoke
0x00007ffe629ba715 (Unity) ScriptingInvocation::Invoke<void>
0x00007ffe62ae1213 (Unity) Scripting::UnityEngineInternal::Input::NativeInputSystemProxy::NotifyUpdate
0x00007ffe62d998ca (Unity) SendInputEventsToScript
0x00007ffe62d9941d (Unity) InputUpdate
0x00007ffe62d98cb9 (Unity) `InternalInitializeModule_Input'::`2'::PreUpdateNewInputUpdateRegistrator::Forward
0x00007ffe6265da8c (Unity) ExecutePlayerLoop
0x00007ffe6265dc0d (Unity) ExecutePlayerLoop
0x00007ffe62663c95 (Unity) PlayerLoop
0x00007ffe635fc324 (Unity) PlayerLoopController::InternalUpdateScene
0x00007ffe6360914d (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop
0x00007ffe6360749c (Unity) Application::TickTimer
0x00007ffe63a6ef0a (Unity) MainMessageLoop
0x00007ffe63a747c6 (Unity) UnityMain
0x00007ff6a89c29fa (Unity) __scrt_common_main_seh
0x00007fff152e257d (KERNEL32) BaseThreadInitThunk
0x00007fff1584aa68 (ntdll) RtlUserThreadStart

my code is:

using UnityEngine;
using UnityEngine.InputSystem;

public class TouchDragScript : MonoBehaviour
{
    private PlayerInput playerInput;
    private InputAction touchPositionAction;
    private InputAction touchPressAction;
    private void Awake ()
    { 
        playerInput = GetComponent<PlayerInput>();
        touchPositionAction = playerInput.actions["TouchPress"];
        touchPressAction = playerInput.actions["TouchPosition"];
    }

    private void OnEnable()
    {
        touchPressAction.performed += TouchPressed;
    }

    private void OnDisable()
    {
        touchPressAction.performed -= TouchPressed;
    }

    private void TouchPressed(InputAction.CallbackContext context) 
    { 
        float value = context.ReadValue<float> ();
        Debug.Log (value);
    }
}

InvalidOperationException: Cannot read value of type 'float' from control '/Simulated Touchscreen/position' bound to action 'Touch/TouchPosition[/Simulated Touchscreen/position]' (control is a 'Vector2Control' with value type 'Vector2')

The first line of the error describes the issue in the following block of code.

private void TouchPressed(InputAction.CallbackContext context) 
{ 
        float value = context.ReadValue<float> ();
        Debug.Log (value);
}

you are trying to read the value of type float but the context has a value of type Vector2

Try changing your code to this

private void TouchPressed(InputAction.CallbackContext context) 
{ 
        Vector2 value = context.ReadValue<Vector2> ();
        Debug.Log (value);
}