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.