If i have a side business that has more expenses then income, can i
deduct the expenses from the taxes paid on my primary income?
Business losses offset ordinary income, which affects your taxable income and therefore income tax burden. In this case you'd have $1,000 in business income and $5,000 in expenses, so business losses of $4,000. Your tax burden wouldn't be reduced by $4,000, but your taxable income would be reduced by $4,000. So $4,000 in actual loss to you would net you tax savings of $960 - $1,280 depending.
However, if you aren't actually trying to make money with your business the IRS may consider it to be a hobby, in which case losses aren't allowed, so expenses can only be used to offset income. Additionally, the latest tax bill introduced limits on losses from pass-through entities (500k married, 250k other).
You'll read various rules of thumb about how many years you must show profit to avoid the scrutiny of the IRS, but if you are trying to make money and happen to lose money for many years, then losses are allowed, it's more about intent than success.