All cours have a gamut.
Hex are made up of 0-255 colours
RGB is made up of additive colours
CMYK is made up of subtractive colours
All these different colour models have a different gamut - that is that a lot of the colours that are created in hex/rgb cannot be created in CMYK - as they are out of gamut.
See the diagram below - certain colours cannot be replicated as they are out of gamut
Rufus MapQuest UpToDate
In printing, a lot of people rely on Pantone colours - as each printers would have a printed book of Pantones, as they are specially mixed inks for colour consistency.
If you got something printed using Pantone colours - and then next time got it printed CMYK - it's more than likely the colours will be varying.
In short - don't use HEX colours in print - as they are out of gamut with CMYK printing and the colours will shift.
View attachment 6395