I always googled the exact way to install certificates on Ubuntu local machine, so I left a note for my reference.
Ubuntu cert store http://manpages.ubuntu.com/manpages/jammy/man8/update-ca-certificates.8.html
Add the self-sign certificate to the trusted CA list under /usr/share/ca-certificates. The extension should be .crt. Add a line about the certificate in the configuration file /etc/ca-certificates.conf. Run sudo update-ca-certificates.