Hi @Hans12323, welcome to the forum
The Pixhawk 4 hasn’t been supported until very recently, so there isn’t a stable release for it. To use it with ArduSub you’ll need to use the Development release (ArduSub 4.2) or the Bar30 won’t work, as covered in this thread: