I've found a solution that worked for me in case anyone is still having this problem. I found that simply putting my iPhone in 'airplane' mode for a few seconds, then disabling 'airplane' mode solved it just like THAT. Only on the iPhone, Mac has no airplane mode but I didn't turn off wifi or ethernet.
I realize this thread is 9 months old but I ran into this issue today and hope this helps someone out there facing the same frustration. BTW, this solved ALL continuity/handoff issues for me.
Source: idownloadblog.com (https://bit.ly/IDB_Universal_Clipboard_not_working)
I should mention that I tried this AFTER doing Labachev's terminal suggestion above which (I think) didn't work for me but it's possible the one two punch of both did the trick, I honestly don't know. If airplane mode doesn't work, run Labachev's terminal suggestions THEN enable/disable airplane mode to mimic my steps exactly.
I'm on Mac OS Sonoma 14.2.1 and IOS 17.2.1, both current as of January 6, 2024 (today).
Good luck!