I have an electric car that I'd like to charge faster. I have a charger (EVSE) that will pull 24A. I have a detached garage with 30A service running to it (10-3 wiring, 30A breaker at the main panel). My question is: Am I allowed to have a 30A breaker in my garage subpanel with 30A service?
A 30-amp breaker in the main panel, feeding 10-gauge cable, can have a subpanel at the end with a 30-amp breaker in the subpanel.
However, if you live in the USA, NEC requires high-current devices that draw electricity for a long time to not draw more than 80% of the capacity of the circuit's design. This is called a de-rate.
Your EV charger is one of those always-ish-on devices drawing large currents. Your circuit cable is 10/3, which is 30 amps maximum. 80% of 30 Amps is 24 Amps, which is the maximum current that your existing circuit can allow for the EV charger. However, you cannot change the garage service or EV charger circuit breakers to anything larger than 30 Amps with your existing service. And you cannot increase the EV charging circuit beyond the existing 24 Amps.
To draw more, you must upgrade the service to the garage. And you have to do a load calculation on your whole house service to determine if there is room for more charging power. If you have room in the load calculation, pick the amount of current you want to use to charge the EV. Find out what maximum current that EV charge current is 80% of (multiply your desired charging current by 1.25) then bump up the replacement garage supply cable and circuit breaker in the main panel to the next available circuit breaker size typically available for your panel above the calculated current, and appropriately-matched cable gauge. An new question on calculating this value would be a good idea if you want to go this route.
In addition to the 80% derate, whole house load calculation, etc. all discussed in Triplefaul's answer, you also need to do a load calculation for the garage, or at least put in some consideration to the existing loads.
As I understand it (the question is not 100% clear), you are currently charging using a Level 1 charger (i.e., 15A (12A actual) or 20A (16A actual) at 120V) and want to install a 24A actual (30A breaker required) Level 2 charger. Since that will take the entire garage load allocation, you are immediately heading into dangerous territory.
I'm not too concerned about lights (assuming they are LED or fluorescent) as that load is probably 1A or less. But any significant additional load run simultaneously with the 24A EV charging can cause problems. The 80% derate is because of the way things are designed to handle heat in wires. If you add 6A of other loads running at the same time as your EV is charging, you are now at 30A for the subpanel. 30A for the subpanel will not trip the breaker. But if the 6A load is going for a long time ("continuous") then the effect will be to eliminate the safety margin provided by the derate because your subpanel feed is also 30A rated, just like the EVSE circuit.
This is not much of an issue with a larger feed (e.g., 60A) because unless you are minin' or growin', you aren't likely to have that many other continuous loads. But even something as simple as a 12A plug-in heater to work on your car on a cold day would cause problems here - either tripping the 30A breaker (inconvenient) or burn up your wires (because at a 20% overload a breaker may take a while to trip).
Nobody runs a 30A subpanel to a garage for a light bulb. You are ignoring other loads. There's no excuse for doing a proper NEC Article 220 Load Calculation on the loads in the garage -- oh wait, THERE IS!
By using a Load Management System, you can run up to the full speed of the feeder. The system installs "CT clamp" meters on your feeder wires. They measure the draw actually being taken by all the loads in the garage, and adjust EV charge rate so that the feeder is never overloaded.
E.G. This means operating a garage door opener is going to momentarily see the EV charge rate drop from 24A to 12A. But that's fine, it recovers immediately after, but importantly, does not trip the breaker at the house. This means you do not need to "tip-toe" around the EVSE when it's running, nor worry about other family members doing something.
This requires a "wall unit" charger, but you're going to need that anyway to unlock intermediate speeds like 16-24A at 240V. Almost no UL-listed "travel unit" chargers (EVSEs) support* intermediate speeds like that. They are generally all-or-nothing 12A or 32A, both of which are inappropriate for home charging. Those units are for travel, i.e. hotels and RV parks. Do not use the cheap Cheese units off Amazon, they are not safe and can burn your house down.
A wall unit can easily be configured to any amp rate. These delete the need for either a socket or a GFCI breaker (NEC is clear that any socket installed for EV purposes must also have a GFCI breaker. Even though the EVSE has a better GFCI inside.) The Wallbox Pulsar Plus supports Load Management with a cable. The Emporia also does, but uses WiFi to "the cloud" for the connection.
Do you really need 5 times level 1 speed?
People tend to look at amps. Level 1 charging is 12 amps, true, but at half the voltage of 240V.
So 240V @ 16A might seem like "barely more than level 1", but it's actually three times level 1 (when you take overhead loads into account). 4kW charging is not nothing, it will 50% charge even an F150 Lightning in 12 hours. For a more modest EV with a 66kWH pack, you'll regain 80% in that same time.
24A is almost five times level 1 which is overkill for most people, especially those who were marginally able to make it work on level 1.
Simply turning down the power to something compatible with your Load Calculation would save the cost of the Load Management kit.
I shouldn't tell you this, but most level 1 "charger cables" (EVSE) can be tricked into charging at double speed by making a 6" long dongle cord with a NEMA 5-15R (standard socket) on one end and NEMA 6-15P (240V/15A plug) on the other end. Check with fans of your model to confirm this works. However the gotcha with that method is that a 240V socket in a garage needs a costly ($120+) GFCI breaker feeding it, and that sucks. This is money better put toward a wall unit like the Wallbox.
* The Tesla Mobile Connector has 16-24A dongles. And the Cadillac unit has a 24A dongle, if you enjoy paying Cadillac prices. (supposedly the Caddy dongle will fit the Chevy travel unit). Other than the dangerous garbage from Amazon Marketplace, those are the only units I'm aware of.