How do make a raycast game like wolfinstein?

I want to make a game like wolfenstein where the player draws a few trace in a cone in front of them, if the traces hit something it gets drawn to the players screen, also how would I find the enemy’s transform in the level? .