width: 100% or auto are "extrinsic" sizes — the container decides them. min-content, max-content and fit-content() are "intrinsic" sizes instead — only the content decides, so the value itself doesn't change as the container shrinks; if the container ends up narrower than that value, the box simply overflows.
min-content is the narrowest a box can get while still allowing line breaks — practically, "wide enough for the single longest word." max-content is the opposite: the width with no wrapping at all, i.e. the content laid out on one line. fit-content(L) caps that range at L, behaving like clamp(min-content, L, max-content).
Put the same sentence in four boxes with different width rules, and the width: 100% box is the only one that keeps shrinking with its container; the other three insist on their own size and, once the container gets narrower than that, poke past the border (shown here with an orange outline). That's the whole point of intrinsic sizing: it doesn't negotiate with the container.
When to use
width: fit-content suits elements that shouldn't grow wider than their content, like a button. max-content fits text that must never wrap, like a table column header; min-content is handy for measuring the smallest a card is allowed to shrink to.