Purchases/Free Trials can only be made on your device when you double click the side button with the amount showing on the screen, followed by verification with FaceID/TouchID or Passcode. That is not something that can be done by Accident. When you sign up for a Free Trial, you also see the message that the trial needs to be cancelled at least 24 hours before it ends to avoid the subscription charge. It would appear you did not cancel 24 hours before it ended. Everything is spelled out very clearly for you before you make that authorization.
If you did cancel the free trial more than a day before it ended, then contact Apple directly here. They have a record of your cancel date and time and can verify if that is true.
Contact Apple Support - Apple Support
It really is a simple process. LinkedIn is the one that sets the subscription price and benefits far more than Apple does for any subscription you choose with them.
In most cases all transactions in the App Store are final, since it does require that explicit authorization described earlier, but on some occasions Apple may provide a compassionate refund. It should never be expected though.
Request a refund for apps or content that you bought from Apple - Apple Support