I don't feel like anyone mentioned this yet, so I'll give my two cents as well:
Link the amount of sex you need (!) to include to character development.
Sometimes, sex is just sex, and there are genres where it's expected to see some of it (romance without sex is, from an industry standpoint, lackluster – even though that throws ace people under the bus, but oh well). But overall, I'd say that everything and anything in our work serves at least some kind of purpose. Be it that you just casually show how characters interact (= relationship-building for the reader) or bigger things that really build up the narrative.
From my humble perspective, sex is just like everything else. If it's "just there", for the sake of it, I drop out. People can have sex, but I don't need to be a voyeur in the story itself all the time, so if it's not really part of the narrative, I'd say mentioning/hinting it would be enough. If you're writing about a sex worker, then this changes of course lol
But overall, make it part of your characters' arcs and then I think you can figure out for yourself much easier when it's "appropriate" to go full graphic or when it's just not needed. Does something happen while the characters have sex? Something that MUST be shown in order to understand their relationship better? Or is your story about a steamy relationship from the get-go and the readers expect to be treated to some kinky stuff? Go for it!
Otherwise, I'd say you just need to gauge what the story and your characters need, i.e. what your readers need to see in order to be into that relationship.
I hope that helps.