How to properly use alcohol when cooking something?
This is borderline too broad as there's many ways alcohol can be used in cooking, but in reality preparation method doesn't actually make much difference, alcohol doesn't cook off nearly as quickly as people seem to think so it's good practice to expect there will be almost as much alcohol in the end dish as you put in. Some techniques like flambe will burn off some, but there will still be plenty left.
I think the way to go is to understand how much alcohol goes into different foods so you understand you may end up eating, you can then steer away from things that may have too much. It would be unusual for you to ever feel the effects of alcohol when it's used in food because the generally the quantities are very low compared to the bulk of the food. A good example of this is using red wine in a tomato sauce, you may add 250ml of wine to say 1.5 liters of sauce overall. At 17% alcohol that's around 43ml of actual alcohol in that wine, if you have 1/6th of that sauce in your meal you're having about 7ml of alcohol in that sauce, which isn't enough for you to notice any effects.
That's not true across the board though, looking at the other end of the scale you have something like Rum Babas, where you have alcohol at about 8x the concentration of the tomato sauce. If you ate one of those you'd be having about 20-25ml of alcohol, depending on the serving. That's about the equivalent of 1/2 a glass of wine. That's not really that much, even for a teen, but you might notice an effect.
An extreme example would be vodka marinated tomatoes, this involves soaking peeled cherry tomatoes in 500ml (2 US cups) of pure vodka for hours. I served this at a party and a vegetarian guest ate a ton of them and got completely lit!
The upshot of this is that it's about the quantity of alcohol you will end up eating or drinking, preparation only makes a bit of difference in that.