How to make spectra smooth by using gaussian or lorentzian function
please teach how to use gaussian or lorentzian function.

It will take several hours of discussion or 4-5 lectures. You are mixing several things.
a) Briefly, your collected spectrum is noisy. You want to remove the noise. What type of spectra is this?
b) The finite resolution of your spectrometer has nothing to do with noise. Increasing the resolution mathematically or so-called deconvolution is another story.
c) The easiest solution is to &quot;fit&quot; Lorentzian or Gaussians to your experimental spectrum after denoising it (step a). Experimental spectra are neither pure Gaussians nor pure Lorentzians.
Here are the steps. I am mentioning the keywords so that you can search the right terms.

Can you get hold of PeakFit software? It has a better function library than Origin.
Denoise your spectrum, using Savitsky-Golay filter.
Once excessive noise has been filtered, use a trial function such as Gaussian or Lorentzian and see which one fits better. This is checked by residuals.
In an experimental spectrum, not all peaks have the same width so you will have to use multiple Gaussians or Lorentzians to fit a segment of a spectrum.

Search &quot;Pragmatic Introduction to Signal Processing Applications in scientific measurement 2019 edition&quot; by Prof. Tom O'Haver. It is a free book and contains all the practical stuff which would be very useful to you.