For instance, if a card said something like "target creature cannot attack," and a player has already entered into their combat phase and delcared attackers, but hasn't dealt damage, can this spell still be effective?
Once attackers have been declared, this effect will do nothing. However, you can't just jump to combat and declare attackers and say "too late." You have to pass priority and allow other players a chance to do things during each phase and step. When you go to combat, they can use the "can't attack" ability during your main phase or even at the beginning of combat. It's only too late once you've declared attackers in the declare attackers step.
2023 Average Peasant Cube|and Discussion
Because I have more decks than fit in a signature
Useful Resources:
MTGSalvation tags
EDHREC
ManabaseCrafter