It is possible to build this into a Solana Program, however you would probably want to think about how to prevent someone from creating multiple wallets to receive free money.
First you would need to create a PDA within the program that would hold the funds to transfer out -- i.e. vault
Then you can create a fn for when people create a wallet and inside of it issue a transfer of funds:
let vault = &ctx.accounts.vault.to_account_info()
// issue transfer of chest reward to player
**vault.try_borrow_mut_lamports()? -= amount_in_lamports;
**ctx
.accounts
.new_wallet
.to_account_info()
.try_borrow_mut_lamports()? += amount_in_lamports;
Here are some more in-depth examples on the Solana Developers Repo - https://github.com/solana-developers/program-examples/tree/main/basics/transfer-sol
And here are instructions for transferring SPL-Tokens from the Solana Cookbook - https://solanacookbook.com/references/programs.html#how-to-do-cross-program-invocation