There could be various reasons why YouTube suddenly stopped working on your iMac while still being accessible on your iPhone and iPad. It could be due to a software issue, network connectivity problem, or compatibility issue with your iMac. It is recommended to check your internet connection, update your browser or YouTube application, and ensure that there are no conflicting extensions or plugins on your iMac. If the problem persists, contacting YouTube or Apple support might be helpful in resolving the issue.