There is an anchor bug in combination with solana version 1.18 which is causing this error:
Function ZN105$LT$vprog..InitializeStrategy$u20$as$u20$anchor_lang
..Accounts$LT$vprog..
InitializeStrategyBumps$GT$$GT$12try_accounts17hb64a220c71e28f36E
Stack offset of 5168 exceeded max offset of 4096 by 1072 bytes,
please minimize large stack variables
The issue has been solved here:https://github.com/coral-xyz/anchor/pull/2939 and you can read the whole dicussion about the problem here: https://github.com/anza-xyz/agave/issues/1186
At the moment using 1.18 with plattform tools 1.41 not all stack frame errors are visible at compile time like in the warning. This is fixed here with plattform tools version 1.42. https://github.com/anza-xyz/agave/pull/2461 There is no backport yet to version 1.18.
So most of these errors will be fixed using the new anchor version: https://github.com/coral-xyz/anchor/pull/2939 in combination with Anza Agave 2.0.
The release of this is still blocked by the new meta data program upgrade as can be seen here.
https://github.com/anza-xyz/agave/issues/1186
You can either patch it yourself using force inline like in the Anchor PR or box more of your accounts and decrease the stack size like that manually and get rid of the warning. Its recommended to not have these warning since they can result in runtime errors.
There is a solution on the way for the stack frame problems which will fix these problems forever, but it still needs to go through the SIMD process: (see https://github.com/solana-foundation/solana-improvement-documents/pull/166)