@OPV you don't need to provide complete path, as we know Angular ultimately build the project even we perform ng serve. So, folder structure becomes like below image :

here you can see asset folder is parallel to index.html file which ultimately using your image. Hence you need to provide path considering above structure.
for my test.jpg file
path will be : './assets/img/test.jpg'
For example : <div style="background-image: url('./assets/img/test.jpg')" ></div>
Here ./
indicates current folder, as above structure shows that index file is in current folder of asset folder we have to start path from current folder.
Hope it will resolve your query, if you find any problem please let me know I will be happy to help.