If it was me, I’d go with a cabinet install that allows for a 24" dishwasher. That’s the standard size, and you might have trouble replacing a broken 18" dishwasher in the future.
18” dishwashers are still very easy to get ahold of. I’ve recently replaced one and while I had more limited options compared to 24”, there were still dozens to choose from.
I’ve gotten some good deals on lightly used 24" dishwashers. I’ve never seen an 18" come up, though I’m sure they’re out there. I think I paid about 50% of MSRP on my current one that has been very good to me.
I see lots of people saying there are plenty of 18"s, and I’m sure that’s true if you buy them new. I guess I just wanted to agree with you and share my experience.