Copy and paste from iPhone to Mac isn’t working

I used to copy text on my iPhone and paste it straight onto my Mac, but lately it’s stopped working. When I paste on the Mac, I get whatever I last copied on the Mac instead. Both devices use the same Apple Account and Wi-Fi and Bluetooth are on. What else should I check?