According to the PHB it would seem that is how it is calculated.
Some spells require the caster to make an attack roll to determine whether the spell effect hits the intended target. Your attack bonus with a spell attack equals your spellcasting ability modifier + your proficiency bonus.
It is also a ranged attack so it the calc looks like this :
Please provide the link to your character sheet so someone can take a look.
But as a guess based on the limited information from your screenshot, you got Fire Bolt via a dropdown selection from a class feature or racial trait. Due to limitations of DDB, if you have a magic item that gives you +2 to spell attacks, that will only apply to spells you get through normal spell selection for your class (Manage Spells.)
Rollback Post to RevisionRollBack
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
Is there something I'm missing?

Link your character.
According to the PHB it would seem that is how it is calculated.
It is also a ranged attack so it the calc looks like this :
“Spell attack” = roll a d20 and add prof and mod.
I hope this helps :)
Here is another thread on how the Spell Attack vs Modifier might work that may help with why it is lower.
https://www.dndbeyond.com/forums/dungeons-dragons-discussion/rules-game-mechanics/65843-spell-modifier-attack
Please provide the link to your character sheet so someone can take a look.
But as a guess based on the limited information from your screenshot, you got Fire Bolt via a dropdown selection from a class feature or racial trait. Due to limitations of DDB, if you have a magic item that gives you +2 to spell attacks, that will only apply to spells you get through normal spell selection for your class (Manage Spells.)
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
...
I reckon OP's confusion stems from the fact that it says his spell attack modifier is +9, but firebolt has +7.
Like naruhoodie is explaining, it isn’t getting “-2” to hit, it just also isn’t getting the +2 that everything else is getting.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting