You didn't specify your Ubuntu version, I show how to do it in 22.04, but I believe this should work in all other recent versions of Ubuntu in the same way.
First switch to detailed view (#1 in the picture) since this is the view you want to use with most folders. Then click the hamburger menu icon (#2 in the picture), choose Configure
from the popup menu (#3 in the picture) and choose Configure Dolphin
in the next popup menu (#4 in the picture).

Now the Configure - Dolphin
window is open, here choose General
,choose the Behavior
-tab, select Remember display style for each folder
and hit the Apply
-button.

Now back in the dolphin window visit your home folder and switch the view to compact view. Done, now your home folder will be displayed with larger icons in compact view while all other folders will be displayed with smaller icons in detailed view.

As a side note: In the configuration window you can define the defaults for the different display styles when you choose View Modes
from the side bar.