My doubt is not about a code of mine but one that I found, it worked for me, but I don't know how it works. It is the following:
let currentUrl = this.router.url;
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.router.navigate([currentUrl]);
It works perfectly for what I want, which was to update a single component and not have to update my entire page, since when creating a new object in the database the only way to see it reflected in my page was if I manually reloaded it