You need to unwrap your donut (go in Edit mode, select all and choose the Smart UV Project mode), then paint in Solid or Material Preview display mode. It looks like in Cycles you can't see a direct result of your painting in Render mode, you need to save your image to see it (needs confirmation).
From what I understand you prefer to paint in the Image Editor rather than in the 3D view, in that case you need to choose another unwrap method, like for example with seams. First you need to select the edges that will be your seams, press U > Mark Seam:
Then move and rotate the UV in the UV Editor the way you want, you can square it with the UV Squares addon:
Then paint on the image in the Image Editor window. But note that you'll have to make correct joints where the seams happen, so it may need some corrections in Texture Paint mode in the 3D view.