Similar to DND 5E, if you use magic in Baldur's Gate 3, you have to be smart about how you use your spell slots.
One of the earliest inconveniences you will encounter in Baldur’s Gate 3 will be exhausting your spell slots. If you are unfamiliar with how D&D 5E works, spells have limited uses to balance them, and once these slots are used up, you will have to rest. Depending on the spell, you will need to short rest or long rest. Spells come in various tiers, and as you level up, you will increase the number of slots you have in those individual tiers.
On top of this, Cantrips are spells that are usable whenever and will not expend spell slots; these are tried and true moves that you should rely on, especially in the early game. For example, Gale starts with Firebolt and Frost Ray as cantrips. He can use these freely without worrying about rest.
When it comes to refilling slots, resting is key. You can take up to 2 Short Rests per Long Rest. A short rest will refill Warlock’s indicated spells and 50% of your health. Remember to use them sparingly.
You can also use Long Rest. Long Rest will refill full health and all the spell slots for your party if you have the required food items. Be careful when Long Resting, especially during quests, as many times long resting will pass time and cause the story to progress.
Avoid Long Rests where possible and try to ration your spells for when needed; focus on using Cantrips unless you need bigger spells.
Lastly, some classes can use “Spell Slot Restoration.” You can use this ability outside of combat to refill your spells once per Long Rest. Using your Short Rests, Cantrips, and being careful about your spell usage will help you avoid Long Resting as frequently.