how to add Polyfills in next js project

When I created a project in NestJS, I encountered different errors in different browsers. For example, I implemented a button that uses the microphone, and it works perfectly in Chrome but not in Brave. Can someone help me resolve this issue, possibly using polyfills?