Kinda looks like something to adjust pressure but I’m not sure.
The indentions on the side are for a spanner wrench to tighten this nut onto a threaded rod. The top is a decorative cover.
The hole looks like it’s for a set screw to me, but I agree the cap is just a decorative cover. Not sure what this would be used for though as I don’t understand what function a collar and cap like this would do mechanically.
Edit: I see OP mentioned the holes don’t go through so you’re right they’d be for some special tool.
A couple of more pics.
i saw something like this once where it connects a tank of carbon dioxide to a sodastream type of drink bubbler.
Looks like a spanner nut and the cap appears to be a jam screw to lock it in place.