Create an assets folder inside the public folder to move all your images into. Then, you can access the images directly without using require() like this:
<img
src={`/assets/${tagEl.value}.png`}
alt="tag"
style={{ width: "3rem" }}
className="suggestion-img-img"
/>