It sounds like you're renting a car. If so and your rental is allowed on the ferry, taking it across and having it on Orkney could be a very good thing. When I was there, some people rented cars in Kirkwall to drive to the things they wanted to see. I had to do a tour and use the local buses to get around.
I think the NorthLink Ferries route from Scrabster to Stromness is the easiest way to get to Orkney, whether you walk on or drive on. There are sailings daily and each takes about 1 1/2 hours. From Stromness it's a short drive to Kirkwall. If you walk on like I did, a local bus shows up shortly after the ferry docks in Stromess and goes directly to the bus station in the center of Kirkwall.
Here's a link to the Northlink Ferry options: https://www.directferries.co.uk/scrabster_stromness_ferry.htm
At the Tourist Information next to the bus station I arranged a tour for the following day. It included the major sites and it did take all day. We did most of the items on the list linked below that required driving to them. The in-town things I did on my own. This somewhat dated link also has other information you might find useful: https://www.zigzagonearth.com/things-to-do-in-orkney-scotland/
The Direct Ferries link above will give you all the options for the dates you want to go. I noticed that there are daily sailings in July from Scrabster to Stromness at about 13:00, and daily sailings from Stromness to Scrabster at about 11:00. If it was me, and I could take my rental car on the ferry, I'd drive up to Thurso and take the early afternoon sailing to Stromness. I'd drive to Kirkwall and spend 2 nights in Kirkwall so as to have an entire day on Orkney. Then drive back to Stromness to take the late morning ferry to Scrabster.
The Pentland Ferries options look more complicated and I've read that their route to St. Margaret's Hope is often rougher than the NorthLink Ferries one. But you might find their schedules more suitable to your needs. Either is a significant distance from Inverness.
When I went, instead of taking a ferry of any kind back to the mainland, I flew from Kirkwall to Aberdeen. It was a tiny plane and it was very windy. We sort of landed sideways. 🥴