in the form of them giving me the key for getting access to the wallet.
Something I associate with scams.
If this is an online wallet (custodial) this sort of thing is normally explicitly forbidden in the terms and conditions. And for good reasons.
If it is a more normal wallet, it is an idiotic way of donating money. That by itself is suspicious.
Is it possible, that I'll run into trouble here?
It is possible, but there's insufficient information to guess how unlikely it is.
Suppose that the wallet (key) is stolen or that money that is the proceeds of crime will be routed through it. It is possible that, having accessed or used the wallet you will be traced and held responsible for money laundering, handling stolen money or accused of complicity in crime.
Maybe they're hoping you don't know that changing the password won't lock them out of the wallet and that sometime in the future you'll add money to that wallet that they will then steal.
Maybe they're grooming you and will later ask you to perform some sort of favour for them involving the use of that wallet in a way that helps them but lands you with debt or a day in a police interview room?
Or it may be the donor is just appallingly inept. Or thinks you are?
In the end it doesn't matter, you don't have to work out the exact way they are trying to trick you. If it seems at all suspicious, keep well clear and don't get involved at all.
The only relatively safe way to accept Bitcoin as a gift is to download a popular respected wallet to a clean PC or phone, don't give anyone else any details at all about your wallet apart from a single-use bitcoin address they can transfer some amount of Bitcoin to. Never accept wallets or keys from other people.