As long as a solana progamm is not frozen you can update it any time. If it becomes bigger after the upgrade you need to check if you payed enough rent for the new program size.
As of now all programs deployed will be deployed with double the size needed. This will change soon since it is now possible to extend the size of programs.
Extend program was activated on mainnet in epoch 532:
https://github.com/solana-labs/solana/issues/26385
For accounts you can also allocate more data and then use the bytes after you extended the accounts.
To increase an account size using anchor you can for example do it like this:
#[derive(Accounts)]
#[instruction(len: u16)]
pub struct IncreaseZeroCopy<'info> {
#[account(mut,
realloc = len as usize,
realloc::zero = true,
realloc::payer=signer)]
pub data_holder: AccountLoader<'info, DataHolder>,
#[account(mut)]
pub signer: Signer<'info>,
#[account(address = system_program::ID)]
pub system_program: Program<'info, System>,
}
In a progamm you can also use:
pda_account.realloc(new_size, false)?;
In this repo you can see some more info about how to create big accounts and realloc:
https://github.com/solana-developers/anchor-zero-copy-example
The max size for accounts created via CPI (for example anchor init) is 10K max account size in general 10mb.
Complicated it becomes when you need to migrate data. Then you probably want to have a migration instruction in your program and V1 and V2 accounts or smth like that.