Technically it is illegal in the US, yes. You can't use any copyrighted work, even non-commercial (this is a common mistake). However, it's unlikely that you will be sued for drawing a comic book character, or making a reimagining of a game. For example, many artists draw anime characters in their style, or you have things like the Tomb Raider Unreal Engine 5 demo, or mods with famous characters. Only a few companies really care that much, like Nintendo. For the most part, it is not a problem if you are just sharing for free.