Found a solution. You have to install the packages from source through this link:
https://docs.universal-robots.com/Universal_Robots_ROS2_Documentation/doc/ur_robot_driver/ur_robot_driver/doc/installation/installation.html
Then you have to install “ur_client_library”, “ur_description”, and “ur_msgs” from apt using “sudo apt get ros-humble-ur-client-library …”. Clean built the workspace and it should work!