Just a couple of points. First, a flange should be resting on top of the the finished floor. You can get by with flush, but since you have to repair the damaged floor and install a new flange anyway, it should be done right. You need to remove as much of the floor and sub floor as necessary and replace all of the damage. You may be able to salvage the tile and reuse it, but the tile under the toilet does not have to be color matched, only the thickness needs to be the same. The tile under the flange can be notched for the screws that hold the flange down before the tile is adhered to the the floor. Drilling later is possible but is a PITA. Check the floor for level before setting the toilet. If it is level, no shims should be necessary. Set the toilet with a single wax ring that does NOT have the plastic funnel or horn, what I call a "plain Jane ring". The new flange should have a stainless steel rim. Avoid the cheap PVC or ABS rims, the can break. Use #12 stainless steel screws to anchor the flange to through the finished floor and at least into the sub floor. Brass is OK, but not as strong as steel. As a novice, you may be wise to have a plumber deal with the installation of the flange after the floor is repaired.