It’s a debugging technique not a permanent solution.

If logging out of iCloud does NOT fix the problem, you eliminated a bunch of potential issues at once.